StrictControl
A Control that allows you to select the maximum number of panels to move at a time
Constructor
constructor(options?: Partial<StrictControlOptions>);
Constructs a new instance of the StrictControl class
Properties
setActive
Type: (newActivePanel: Panel, prevActivePanel: Panel | null, isTrusted: boolean) => void
Methods
destroy
destroy(): void
Destroy Control and return to initial state
Remarks: This method also resets the index range used for movement constraints.
moveToPanel
moveToPanel(panel: Panel, options: MoveToPanelParams): Promise<void>
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: StrictControl restricts movement to panels within the allowed index range based on the count option.
Throws:
Fires:
updateInput
updateInput(): this
Update controller's state
Returns: The current instance for method chaining
Remarks: StrictControl limits the movement range based on the count option.