- I
Remarks
See Also
Developer's Guide
Members
Constructors
Properties
Gets an immutable snapshot of the IModelItems affected by the currently active gesture.
When the gesture is starting and the positionHandler is initialized, the implementation can register the affected item(s) through the IModelItemCollector instance that is bound to the context available via its lookup.
Client code can register with the drag-started event, as well as the drag-finished event to get notified of the elements that may be or have been affected respectively by this input mode.
Property Value
Examples
mode.moveSelectedItemsInputMode.addEventListener('drag-finished', () => {
for (const item of mode.moveSelectedItemsInputMode.affectedItems) {
// these items have been moved
}
})See Also
Developer's Guide
Defined in
MoveInputMode.affectedItemsGets or sets the event recognizer that determines whether to start moving the selection.
See Also
Developer's Guide
Defined in
MoveInputMode.beginRecognizerTouchGets or sets the event recognizer that determines whether to cancel the move.
Gets the installed controller.
Defined in
MoveInputMode.controllerGets or sets the event recognizer that constrains the current movement to be orthogonal or diagonal.
Gets or sets the event recognizer that determines whether to temporarily disable snapping.
Examples
mode.moveSelectedItemsInputMode.enabled = falseSee Also
Developer's Guide
Defined in
MoveInputMode.enabledGets or sets the event recognizer that determines whether to re-enable temporarily disabled snapping.
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.
Defined in
MoveInputMode.exclusiveGets or sets the event recognizer that determines whether to finish moving the selection.
Defined in
MoveInputMode.finishRecognizerGets or sets the IHitTestable that will be used by this mode to determine where the user may start dragging.
Defined in
MoveInputMode.hitTestableGets or sets the event recognizer that determines whether the user is hovering over an item where the user can begin a move operation.
Defined in
MoveInputMode.hoverRecognizerGets the initial position where the dragging was initiated.
Defined in
MoveInputMode.initialLocationDefined in
MoveInputMode.isDraggingGets or sets the cursor to use while moving items.
See Also
Developer's Guide
Defined in
MoveInputMode.moveCursorGets or sets the event recognizer that determines whether to move the selection.
Retrieves the IInputModeContext this mode has been installed in.
null if this mode is currently not installed. Use createInputModeContext to obtain a context that has this IInputMode as the inputMode.Defined in
MoveInputMode.parentInputModeContextGets or sets the IPositionHandler that will be used as fallback to handle the actual movement of the elements during the drag.
See Also
Developer's Guide
Defined in
MoveInputMode.positionHandlerDefined in
MoveInputMode.priorityGets or sets the GraphSnapContext which manages snapping model items to certain coordinates (for instance, other items).
If set to null (the default) this input mode tries to obtain the GraphSnapContext from the IInputModeContext. To explicitly disable snapping, a GraphSnapContext implementation that is disabled needs to be set.
Default is null.
Defined in
MoveInputMode.snapContextGets or sets the cursor to use while hovering above items that may be moved.
See Also
Developer's Guide
Defined in
MoveInputMode.validBeginCursorMethods
Defined in
MoveInputMode.armSee Also
API
- onCanceled
Defined in
MoveInputMode.cancelReturns the input mode context that will be passed to implementations that are called by this instance and require a context.
Return Value
- IInputModeContext
- A context to use for the implementations that are called by this instance.
Defined in
MoveInputMode.createInputModeContextCreates an IInputModeContext for use with the IPositionHandler interface for the upcoming drag operation.
Defined in
MoveInputMode.disarmInstalls 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
Defined in
MoveInputMode.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.
Defined in
MoveInputMode.onCanceledCan 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.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Overrides
MoveInputMode.onDragCanceledTriggers the drag-canceling event.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Defined in
MoveInputMode.onDragCancelingCalled once the drag has been finalized.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Overrides
MoveInputMode.onDragFinishedCalled before the drag will be finalized.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Defined in
MoveInputMode.onDragFinishingCalled at the end of each drag.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Defined in
MoveInputMode.onDraggedCalled at the start of each drag.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Defined in
MoveInputMode.onDraggingTriggers the drag-started event.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Defined in
MoveInputMode.onDragStartedTriggers the drag-starting event.
Parameters
- evt: InputModeEventArgs
- The event argument that contains context information.
Overrides
MoveInputMode.onDragStartingRaises the query-position-handler event.
Parameters
- evt: QueryPositionHandlerEventArgs
- The QueryPositionHandlerEventArgs instance containing the event data.
Defined in
MoveInputMode.onQueryPositionHandlerCalled after tryStop has been called.
Can be overridden in subclasses to perform additional actions after the mode has been stopped.
This implementation does nothing.
Defined in
MoveInputMode.onStoppedSimulates the start of a drag and puts the state machine into the dragging state.
location.Parameters
- location: Point
- The location where the drag had been initialized.
Return Value
- Promise<IEnumerable<IModelItem>>
- A task that represents the asynchronous drag operation. The result of the task contains the affected items or
nullif the drag was canceled.
Defined in
MoveInputMode.startDragfalseReturn Value
- boolean
trueif and only if the editing has been stopped or there was no edit in progress
Defined in
MoveInputMode.tryStopUninstalls this mode from the given context.
This code should clean up all changes made to the canvas in the install method. After a mode has been uninstalled it can be installed again into the same or another canvas.
Overriding implementations should call the base implementation after their own code.
Parameters
- context: IInputModeContext
- The context to deregister from. This is the same instance that had been passed to install during installation.
Defined in
MoveInputMode.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
Defined in
MoveInputMode.drag-canceledOccurs before the drag will be canceled.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
MoveInputMode.drag-cancelingOccurs once the drag has been finished.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
Examples
mode.moveSelectedItemsInputMode.addEventListener('drag-finished', () => {
for (const item of mode.moveSelectedItemsInputMode.affectedItems) {
// these items have been moved
}
})See Also
Developer's Guide
Defined in
MoveInputMode.drag-finishedOccurs before the drag will be finished.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
MoveInputMode.drag-finishingOccurs 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
Defined in
MoveInputMode.drag-startedOccurs once the drag is starting.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
MoveInputMode.drag-startingOccurs at the end of every drag.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
MoveInputMode.draggedOccurs at the start of every drag.
Properties of
InputModeEventArgs- context: IInputModeContext
- Gets the context for the current event.
See Also
Developer's Guide
Defined in
MoveInputMode.draggingOccurs when a drag is recognized for the MoveInputMode.
Properties of
QueryPositionHandlerEventArgs- context: IInputModeContext
- Gets the context for the current event.
- handled: booleanwritable
- Gets or sets a value indicating whether this QueryPositionHandlerEventArgs has been handled.
- positionHandler: IPositionHandlerwritable
- Gets or sets the IPositionHandler to use for the movement of the items that are affected by the MoveInputMode.
- queryLocation: Point
- Gets the location of the movement (where the drag has started).
See Also
Developer's Guide