documentationfor yFiles for HTML 3.0.0.3

MoveViewportInputMode

An IInputMode implementation that can be used to pan or zoom the viewport of a CanvasComponent via mouse, stylus, and multitouch gestures.

Inheritance Hierarchy
MoveViewportInputMode
Implemented Interfaces

Remarks

This implementation will request the mutex as soon as it recognizes a drag with the pointers or touch devices.

If allowPinchZoom is enabled, zooming is done with two touch pointers using the pinch zoom gesture. If the primary pointer is released during pinch, the secondary pointer is used for moving the viewpoint. The pinch zoom then can be restarted by touching another pointer that is recognized as the primary pointer.

If allowSinglePointerMovement is enabled, moving the viewport can be started with a single pointer, i.e., touching with one finger. Disabling this property is especially useful for applications that allow editing. When disabled, other gestures like moving items, or creating edges can be configured to start without a long press.

This mode is exclusive by default.

Examples

Typically, the MoveViewportInputMode is installed as child mode of a GraphEditorInputMode or GraphViewerInputMode and can be retrieved from the moveViewportInputMode property. Note that in these scenarios, the configuration may be different from the documentation of the defaults of this type.
Getting the MoveViewportInputMode from its parent input mode
const moveViewportInputMode = mode.moveViewportInputMode

Type Details

yFiles module
view

Constructors

Properties

Methods

Events