NavVis IVION API
    Preparing search index...

    Interface MouseEventReceiverInterface

    Mouse and touch events

    interface MouseEventReceiverInterface {
        onClick?(
            pos: MouseEventCoordinatesInterface,
            instanceId?: number,
        ): boolean;
        onDoubleClick?(
            pos: MouseEventCoordinatesInterface,
            instanceId?: number,
        ): boolean;
        onDrag?(
            position: MouseEventCoordinatesInterface,
            viewport: ViewportInterface,
            instanceId?: number,
        ): void;
        onDragCancel?(instanceId?: number): void;
        onDragEnd?(
            position: MouseEventCoordinatesInterface,
            viewport: ViewportInterface,
            instanceId?: number,
        ): void;
        onDragStart?(
            position: MouseEventCoordinatesInterface,
            viewport: ViewportInterface,
            instanceId?: number,
        ): boolean;
        onHold?(pos: MouseEventCoordinatesInterface, instanceId?: number): boolean;
        onMouseMove?(
            pos: MouseEventCoordinatesInterface,
            viewport: ViewportInterface,
            instanceId?: number,
        ): void;
        onMouseOut?(
            pos: MouseEventCoordinatesInterface,
            viewport: ViewportInterface,
            instanceId?: number,
        ): void;
        onMouseOver?(
            pos: MouseEventCoordinatesInterface,
            viewport: ViewportInterface,
            instanceId?: number,
        ): void;
        onMouseWheel?(
            pos: MouseEventCoordinatesInterface,
            delta: number,
            instanceId?: number,
        ): boolean;
        translateByWorldOffset?(offset: Vector3): void;
    }
    Index

    Methods

    • Called for mouse clicks and taps

      Parameters

      Returns boolean

      Return true to consume the event, false to pass it on

    • Called for double clicks and double taps

      Parameters

      Returns boolean

      Return true to consume the event, false to pass it on

    • Called when the user cancels dragging by pressing the escape key

      Parameters

      • OptionalinstanceId: number

        The index of the instance if the event occurred on an InstancedMesh.

      Returns void

    • Called for click-and-hold and touch-and-hold

      Parameters

      Returns boolean

      Return true to consume the event, false to pass it on

    • Called when the mouse wheel is turned

      Parameters

      • pos: MouseEventCoordinatesInterface

        Mouse position

      • delta: number

        Mouse wheel delta

      • OptionalinstanceId: number

        The index of the instance if the event occurred on an InstancedMesh.

      Returns boolean

    • Translate the target by an exact world-space offset, without deriving it from a screen position/raycast the way onDrag does. Optional: implement it when something other than pointer movement needs to move the target by a precisely known amount and keep it in sync with an onDrag-driven position (e.g. the crop box staying anchored to the cursor while the map auto-pans near a viewport edge).

      Parameters

      • offset: Vector3

        World-space offset to translate by

      Returns void