get_pinchInteractiveMode();
set_pinchInteractiveMode(value);
Object.defineProperty('pinchInteractiveMode');
Type | Description |
---|---|
ImageViewerInteractiveMode | The interactive mode for pinch events in the viewer control. Default value is null. |
To use an interactive mode, you create an instance of any of the derived classes and assign it to the viewer using one of the following methods:
ImageViewer.DefaultInteractiveMode: Assigns the interactive mode to the left mouse button on desktop browsers or default touch events on devices that support touch.
ImageViewer.TouchInteractiveMode: Assigns the interactive mode in devices that support touch.
ImageViewer.SetMouseInteractiveMode: Assigns the interactive mode to the specified mouse button on desktop browsers.
ImageViewer.MouseWheelInteractiveMode: Assigns the interactive mode to the mouse wheel on desktop browsers.
ImageViewer.PinchInteractiveMode: Assigns the interactive mode to the pinch gesture on browsers that support touch.
On desktop browsers, you can use multiple interactive modes at the same time. For example, use the following code to support panning/zooming with the left mouse button and magnify glass with the right button:
viewer.setMouseInteractiveMode(Leadtools.Controls.MouseButton.left, new Leadtools.Controls.ImageViewerCenterAtInteractiveMode());
viewer.setMouseInteractiveMode(Leadtools.Controls.MouseButton.right, new Leadtools.Controls.ImageViewerMagnifyGlassInteractiveMode());
viewer.set_MouseWheelInteractiveMode(new Leadtools.Controls.ImageViewerPanZoomInteractiveMode());
On browsers that support touch, such as mobile phones and tablets, you can assign multiple interactive modes at the same time. For example, use the following code to support zooming with the pinch gesture and magnify glass with the single touch gesture:
viewer.set_TouchInteractiveMode(new Leadtools.Controls.ImageViewerMagnifyGlassInteractiveMode());
viewer.set_PinchInteractiveMode(new Leadtools.Controls.ImageViewerPanZoomInteractiveMode());
Some of the interactive modes such as ImageViewerPanZoomInteractiveMode supports multiple touch operations such as pinch to zoom.