C

ReparentStripeInputMode

Specialized input mode that is used to reparent a stripe inside an ITable structure.
ImplementsInheritance Hierarchy

Remarks

This implementation delegates most work to an instance of ReparentStripePositionHandler

See Also

Developer's Guide

Members

Show:

Constructors

Parameters

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.

readonlyfinal

Property Value

A snapshot of the current collection of the items that are affected by the move operation.

Examples

If one needs to execute some code after some items have been moved by the MoveInputMode he can register a handler to its drag-finished event. The moved items can be retrieved from the affectedItems property:
mode.moveSelectedItemsInputMode.addEventListener('drag-finished', () => {
  for (const item of mode.moveSelectedItemsInputMode.affectedItems) {
    // these items have been moved
  }
})

See Also

Developer's Guide
Gets or sets the event recognizer that determines whether to start moving the selection.
The default recognizer detects MOUSE or PEN DRAG events with the MOUSE_LEFT button.
final

See Also

Developer's Guide
Gets or sets the event recognizer that determines whether to start moving the selection via TOUCH input.
The default recognizer is TOUCH_PRIMARY_DOWN which reacts to the user making touch contact with the main touch device. Using TOUCH_PRIMARY_LONG_PRESS allows for an intuitive alternative configuration, specifically, when panning the viewport is a more frequent use-case.
final

See Also

Developer's Guide
Gets or sets the event recognizer that determines whether to cancel the move.
The default recognizer detects ESCAPE_DOWN or CANCEL and DRAG_CAPTURE_LOST events.
final
Gets the installed controller.
protectedreadonlyfinal
Gets or sets the event recognizer that constrains the current movement to be orthogonal or diagonal.
The default recognizer is SHIFT_IS_DOWN
final
Gets or sets the event recognizer that determines whether to temporarily disable snapping.
The default recognizer is ALT_DOWN.
final

See Also

API
enableSnappingRecognizer
Gets or sets the enabled state of this input mode.
Clients can use this property to disable or reenable this instance. This will set the enabled property of the installed controller so a disabled instance should never try to acquire the input mutex.

Examples

Disabling the MoveInputMode on its parent input mode
mode.moveSelectedItemsInputMode.enabled = false

See Also

Developer's Guide
Gets or sets the event recognizer that determines whether to re-enable temporarily disabled snapping.
The default recognizer is ALT_UP.
final

See Also

API
disableSnappingRecognizer
Gets or sets a value indicating whether this mode will be the only one running when it has the mutex.

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.

final
Gets or sets the event recognizer that determines whether to finish moving the selection.
The default recognizer detects left-up events of mouse and stylus devices.
final
Gets or sets the event recognizer that determines whether to finish moving the selection via TOUCH input.
The default recognizer is TOUCH_PRIMARY_UP.
final
Gets or sets the IHitTestable that will be used by this mode to determine where the user may start dragging.
Gets or sets the event recognizer that determines whether the user is hovering over an item where the user can begin a move operation.
The default implementation uses the hitTestable to determine whether the move operation can be started at the current location.
final
Gets the initial position where the dragging was initiated.
readonlyfinal
Gets a value indicating whether a drag operation is currently in progress.
readonlyfinal
Gets or sets the cursor to use while moving items.
The default cursor is MOVE.
conversionfinal

See Also

Developer's Guide
Gets or sets the event recognizer that determines whether to move the selection.
The default recognizer is MOUSE_DRAG.
final
Gets or sets the event recognizer that determines whether to move the selection via TOUCH input.
The default recognizer is TOUCH_PRIMARY_DRAG.
final
Retrieves the IInputModeContext this mode has been installed in.
The value will be null if this mode is currently not installed. Use createInputModeContext to obtain a context that has this IInputMode as the inputMode.
protectedreadonlyfinal
Gets or sets the IPositionHandler that will be used as fallback to handle the actual movement of the elements during the drag.
Note that the IPositionHandler retrieved by the query-position-handler event has priority before this property. Only if the event is not handled this property is used.
final

See Also

Developer's Guide
Gets the priority of this input mode.
The priority will influence the order in which the modes will be installed into the CanvasComponent. The lower the priority value, the earlier it will be installed. If two modes are using the same priority value, the first one to be registered will be installed earlier.
final
Gets 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.

final
Gets or sets the cursor to use while hovering above items that may be moved.
The default cursor is MOVE.
conversionfinal

See Also

Developer's Guide

Methods

Called when this mode is "armed".
This happens when the mouse hovers over the item(s) to move. This implementation sets the mouse cursor to validBeginCursor.
protected
Cancels the editing of this mode.
This implementation releases the mutex if it is currently owned by this instance and calls onCanceled.

See Also

API
onCanceled
Returns the input mode context that will be passed to implementations that are called by this instance and require a context.
protected

Return Value

IInputModeContext
A context to use for the implementations that are called by this instance.
Creates an IInputModeContext for use with the IPositionHandler interface for the upcoming drag operation.
Called when this mode is "disarmed".
This happens when the mouse stops hovering over the item(s). This implementation resets the mouse cursor again.
protected
Installs 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
Called after cancel has been called.

Can be overridden in subclasses to perform additional actions after the mode has been canceled.

This implementation does nothing.

protected
Called after the active property of the installed ConcurrencyController has been set to true.

Can be overridden in subclasses to perform additional actions after the mode has been activated.

Overriding implementations should call the base implementation.

protected
Called after the active property of the installed ConcurrencyController has been set to false.

Can be overridden in subclasses to perform additional actions after the mode has been deactivated.

Overriding implementations should call the base implementation.

protected
Triggers the drag-canceled event.
protected

Parameters

evt: InputModeEventArgs
The event argument that contains context information.
Triggers the drag-canceling event.
protected

Parameters

evt: InputModeEventArgs
The event argument that contains context information.
Called once the drag has been finalized.
This method triggers the drag-finished event.
protected

Parameters

evt: InputModeEventArgs
The event argument that contains context information.
Called before the drag will be finalized.
This method triggers the drag-finishing event.
protected

Parameters

evt: InputModeEventArgs
The event argument that contains context information.
Called at the end of each drag.
This method triggers the dragged event.
protected

Parameters

evt: InputModeEventArgs
The event argument that contains context information.
Called at the start of each drag.
This method triggers the dragging event.
protected

Parameters

evt: InputModeEventArgs
The event argument that contains context information.
Triggers the drag-started event.
protected

Parameters

evt: InputModeEventArgs
The event argument that contains context information.
Triggers the drag-starting event.
protected

Parameters

evt: InputModeEventArgs
The event argument that contains context information.
Raises the query-position-handler event.
protected

Parameters

evt: QueryPositionHandlerEventArgs
The QueryPositionHandlerEventArgs instance containing the event data.
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.

protected
Simulates the start of a drag and puts the state machine into the dragging state.
Subsequent moves of input devices will behave as if the dragging has been successfully initiated at 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 null if the drag was canceled.
Will be called to request a stop of the current editing progress.
This should stop the current edit, if one is in progress, and possibly commit all pending changes. If stopping is not possible, this method can return false

Return Value

boolean
true if and only if the editing has been stopped or there was no edit in progress
Uninstalls 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.

Events

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.

Examples

If one needs to execute some code after some items have been moved by the MoveInputMode he can register a handler to its drag-finished event. The moved items can be retrieved from the affectedItems property:
mode.moveSelectedItemsInputMode.addEventListener('drag-finished', () => {
  for (const item of mode.moveSelectedItemsInputMode.affectedItems) {
    // these items have been moved
  }
})

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
Occurs when a drag is recognized for the MoveInputMode.
If the event args are handled, the IPositionHandler that is carried with the event args is used to actually move the items. Otherwise the pre-set positionHandler property is used.
context: IInputModeContext
Gets the context for the current event.
handled: boolean
writable
Gets or sets a value indicating whether this QueryPositionHandlerEventArgs has been handled.
positionHandler: IPositionHandler
writable
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