- I
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
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.const moveViewportInputMode = mode.moveViewportInputModeSee Also
Developer's Guide
Members
Constructors
Properties
Property Value
true if the pinch zoom gesture is allowed to change the zoom level; otherwise, false.See Also
Developer's Guide
true.Examples
false 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.mode.moveViewportInputMode.allowSinglePointerMovement = true
mode.createBendInputMode.beginRecognizerTouch =
EventRecognizers.TOUCH_PRIMARY_DOWN
mode.createEdgeInputMode.beginRecognizerTouch =
EventRecognizers.TOUCH_PRIMARY_DOWN
mode.handleInputMode.beginRecognizerTouch =
EventRecognizers.TOUCH_PRIMARY_DOWN
mode.lassoSelectionInputMode.beginRecognizerTouch =
EventRecognizers.TOUCH_PRIMARY_DOWN
mode.marqueeSelectionInputMode.beginRecognizerTouch =
EventRecognizers.TOUCH_PRIMARY_DOWN
mode.moveSelectedItemsInputMode.beginRecognizerTouch =
EventRecognizers.TOUCH_PRIMARY_DOWNProperty Value
See Also
Developer's Guide
Gets or sets the event recognizer that determines whether to start moving the viewport.
The default instance detects MOUSE or PEN DOWN events with the MOUSE_LEFT or MOUSE_MIDDLE button.
If this input mode is a child mode of GraphEditorInputMode, the default is another recognizer which additionally requires the Ctrl modifier or Space key to be held down.
See Also
Developer's Guide
Gets the installed controller.
Gets or sets the cursor to use during dragging.
Examples
mode.moveViewportInputMode.enabled = falseSee Also
Developer's Guide
The value of this property will be delegated to the exclusive property of the controller.
If this mode is marked as exclusive and has the mutex, all other modes added to the same MultiplexingInputMode will be deactivated. Otherwise, it will always run concurrently with all other modes.
Gets or sets the event recognizer that determines whether to finish the pinch zoom gesture or finish the move if no primary device is down.
Property Value
See Also
Developer's Guide
Gets or sets the event recognizer that determines whether to finish moving the viewport.
See Also
Developer's Guide
Property Value
See Also
Developer's Guide
Gets or sets the mode that determines when to use inertia when dragging the viewport.
Gets or sets the duration of the inertia movement.
1.5 seconds.Gets or sets the event recognizer that determines whether to move the viewport.
Retrieves the IInputModeContext this mode has been installed in.
null if this mode is currently not installed.Gets or sets the event recognizer that determines whether to zoom the canvas using the 'pinch' gesture or move the viewport if no primary device is down.
Property Value
See Also
Developer's Guide
Implements
IInputMode.priorityGets or sets a value indicating whether touch panning should snap to the x- or y-axis.
nullMethods
Implements
IInputMode.cancelInstalls this mode into the given context that is provided by the canvas.
In general a mode can only be installed into a single canvas at all times.
This method is called to initialize this instance. Subclasses should override this method to register the corresponding event handler delegates for the various input events they need to register with.
Overriding implementations should call the base implementation first.
Parameters
- context: IInputModeContext
- The context that this instance shall be installed into. The same instance will be passed to this instance during uninstall. A reference to the context may be kept and queried during the time the mode is installed.
- controller: ConcurrencyController
- The controller for this mode.
See Also
API
- uninstall
Implements
IInputMode.installCalled after cancel has been called.
Can be overridden in subclasses to perform additional actions after the mode has been canceled.
This implementation does nothing.
Can be overridden in subclasses to perform additional actions after the mode has been activated.
Overriding implementations should call the base implementation.
Can be overridden in subclasses to perform additional actions after the mode has been deactivated.
Overriding implementations should call the base implementation.
Triggers the drag-canceled event.
Triggers the drag-canceling event.
Called once the drag has been finalized.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Called before the drag will be finalized.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Called at the end of each drag.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Called at the start of each drag.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Triggers the drag-started event.
Triggers the drag-starting event.
Called after tryStop has been called.
Can be overridden in subclasses to perform additional actions after the mode has been stopped.
This implementation does nothing.
falseReturn Value
- boolean
trueif and only if the editing has been stopped or there was no edit in progress
Implements
IInputMode.tryStopUninstalls this mode from the given context that is provided by the canvas.
This method is called to unregister this instance. Subclasses should override this method to unregister the event handler delegates and free resources which were registered in the install method.
Overriding implementations should call the base implementation at the end.
Parameters
- context: IInputModeContext
- The context that this instance shall be uninstalled from.
See Also
API
- install
Implements
IInputMode.uninstallEvents
Occurs when the drag has been canceled.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Occurs before the drag will be canceled.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Occurs once the drag has been finished.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Occurs before the drag will be finished.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Occurs once the drag is initialized and has started.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Occurs once the drag is starting.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Occurs at the end of every drag.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Occurs at the start of every drag.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide