- The widget that is responsible of ALL Snap related logic and UI. It is important to define two essential concepts used for this package: I) The view is what is being moved. It is the widget that snaps to the bound. II) The bound is what the view is being snapped to.
- A simple class for organising pivot values. Your view will snap to your bound through the closest SnapTarget.viewPivot and SnapTarget.boundPivot match. For example, consider the following: I) SnapTarget.viewPivot = (0.1, 0.1) II) SnapTarget.boundPivot = (0.75, 0.75) These values determine that your view will snap to your bound at: I) The coordinate of the view at (10% SnapControllerState.viewWidth, 10% SnapControllerState.viewHeight. II) The coordinate of the bound at (75% SnapControllerState.boundWidth, 75% SnapControllerState.boundHeight. (All values consider the coordinate plane to start at (0,0) from the top left corner of the view or the bound.) See the provided example for further clarification.