documentationfor yFiles for HTML 2.6

MoveViewportInputMode

An IInputMode implementation that can be used to grab and move and to zoom the viewport of a CanvasComponent.

Inheritance Hierarchy
MoveViewportInputMode
Implemented Interfaces

Remarks

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

If allowPinchZoom is enabled, zooming is done with two fingers 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.
Getting the MoveViewportInputMode from its parent input mode
const moveViewportInputMode = mode.moveViewportInputMode

Type Details

yfiles module
view-component
yfiles-umd modules
All view modules
Legacy UMD name
yfiles.input.MoveViewportInputMode

See Also

Constructors

Properties

Methods

Events