Creates a new instance of the zoom interaction handler.
The NVL instance to attach the interaction handler to.
Options to customize the zoom interaction behavior.
Returns the current options of the interaction.
The current options of the interaction.
Removes the relevant event listeners from the canvas.
Remove a callback for a given event of type.
The name of the event.
Enables or disables global text selection during a drag or pan operation.
Whether to enable or disable global text selection.
OptionaleventFunction: (this: HTMLElement, ev: MouseEvent) => void
The event function to be added/removed when text selection is disabled/enabled.
Add or update a callback for a given event of type.
The name of the event.
The callback to be called when the event is triggered.
Interaction handler for zooming the canvas, which is achieved by:
Remarks
ZoomInteractionCallbacks.onZoomAndPan is the only callback. Zooming also changes the pan so the point under the pointer stays fixed. Zoom limits come from NVL.getZoomLimits.
For examples, head to the Zoom Interaction documentation page.