Skip to main content

ZoomTool

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.

Hierarchy

Index

Constructors

constructor

  • Parameters

    Returns ZoomTool

Properties

publicconfiguration

configuration: Record<string, any>

dirVec

dirVec: Point3

initialMousePosWorld

initialMousePosWorld: Point3

publicmode

mode: ToolModes

Tool Mode - Active/Passive/Enabled/Disabled/

mouseDragCallback

mouseDragCallback: (evt: InteractionEventType) => void

Type declaration

    • (evt: InteractionEventType): void
    • Parameters

      • evt: InteractionEventType

      Returns void

publicsupportedInteractionTypes

supportedInteractionTypes: InteractionTypes[]

Supported Interaction Types - currently only Mouse

publictoolGroupId

toolGroupId: string

ToolGroup ID the tool instance belongs to

touchDragCallback

touchDragCallback: (evt: InteractionEventType) => void

Type declaration

    • (evt: InteractionEventType): void
    • Parameters

      • evt: InteractionEventType

      Returns void

statictoolName

toolName: any

Methods

_dragCallback

  • _dragCallback(evt: InteractionEventType): void
  • Parameters

    • evt: InteractionEventType

    Returns void

_dragParallelProjection

  • _dragParallelProjection(evt: InteractionEventType, viewport: default | default, camera: ICamera, pinch?: boolean): void
  • Parameters

    Returns void

_dragPerspectiveProjection

  • _dragPerspectiveProjection(evt: InteractionEventType, viewport: default | default, camera: ICamera, pinch?: boolean): void
  • Parameters

    Returns void

_panCallback

  • _panCallback(evt: InteractionEventType): void
  • Parameters

    • evt: InteractionEventType

    Returns void

_pinchCallback

  • _pinchCallback(evt: InteractionEventType): void
  • Parameters

    • evt: InteractionEventType

    Returns void

publicapplyActiveStrategy

  • applyActiveStrategy(enabledElement: IEnabledElement, operationData: unknown): any
  • It applies the active strategy to the enabled element.


    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.

publicgetToolName

  • getToolName(): string
  • Returns the name of the tool


    Returns string

    The name of the tool.

preMouseDownCallback

  • preMouseDownCallback(evt: InteractionEventType): boolean
  • Parameters

    • evt: InteractionEventType

    Returns boolean

preTouchStartCallback

  • preTouchStartCallback(evt: InteractionEventType): boolean
  • Parameters

    • evt: InteractionEventType

    Returns boolean

publicsetActiveStrategy

  • setActiveStrategy(strategyName: string): void
  • 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

  • setConfiguration(newConfiguration: Record<string, any>): void
  • merges the new configuration with the tool configuration


    Parameters

    • newConfiguration: Record<string, any>

    Returns void