ZoomTool
Hierarchy
- BaseTool
- ZoomTool
Index
Constructors
Properties
Methods
Constructors
constructor
Parameters
toolProps: PublicToolProps = {}
defaultToolProps: SharedToolProp = ...
Returns ZoomTool
Properties
publicconfiguration
dirVec
initialMousePosWorld
publicmode
Tool Mode - Active/Passive/Enabled/Disabled/
mouseDragCallback
Type declaration
Parameters
evt: InteractionEventType
Returns void
publicsupportedInteractionTypes
Supported Interaction Types - currently only Mouse
publictoolGroupId
ToolGroup ID the tool instance belongs to
touchDragCallback
Type declaration
Parameters
evt: InteractionEventType
Returns void
statictoolName
Methods
_dragCallback
Parameters
evt: InteractionEventType
Returns void
_dragParallelProjection
Parameters
evt: InteractionEventType
viewport: default | default
camera: ICamera
pinch: boolean = false
Returns void
_dragPerspectiveProjection
Parameters
evt: InteractionEventType
viewport: default | default
camera: ICamera
pinch: boolean = false
Returns void
_panCallback
Parameters
evt: InteractionEventType
Returns void
_pinchCallback
Parameters
evt: InteractionEventType
Returns void
publicapplyActiveStrategy
Applies the active strategy function to the enabled element with the specified operation data.
Parameters
enabledElement: IEnabledElement
The element that is being operated on.
operationData: unknown
The data that needs to be passed to the strategy.
Returns any
The result of the strategy.
publicapplyActiveStrategyCallback
Applies the active strategy, with a given event type being applied. The event type function is found by indexing it on the active strategy function.
Parameters
enabledElement: IEnabledElement
The element that is being operated on.
operationData: unknown
The data that needs to be passed to the strategy.
callbackType: string
the type of the callback
Returns any
The result of the strategy.
publicgetToolName
Returns the name of the tool
Returns string
The name of the tool.
preMouseDownCallback
Parameters
evt: InteractionEventType
Returns boolean
preTouchStartCallback
Parameters
evt: InteractionEventType
Returns boolean
publicsetActiveStrategy
Sets the active strategy for a tool. Strategies are multiple implementations of tool behavior that can be switched by tool configuration.
Parameters
strategyName: string
name of the strategy to be set as active
Returns void
publicsetConfiguration
merges the new configuration with the tool configuration
Parameters
newConfiguration: Record<string, any>
Returns void
ZoomTool tool manipulates the camera zoom applied to a viewport. It provides a way to set the zoom of a viewport by dragging mouse over the image.