SnapControl
A Control that uses a release momentum to choose destination panel
Constructor
constructor(options?: Partial<SnapControlOptions>);
Constructs a new instance of the SnapControl class
Properties
Methods
moveToPosition
moveToPosition(position: number, duration: number, axesEvent?: OnRelease): Promise<void>
Move Camera to the given position
Parameters:
-
position(number) - The target position to move -
duration(number) - Duration of the panel movement animation (unit: ms)
Returns: A Promise which will be resolved after reaching the target position
Remarks: This method calculates the snap target based on the release momentum and threshold settings.
Throws:
Fires: