An IReparentNodeHandler that treats shift key presses as reparent gestures and allows for reparenting all nodes.
Type Details
- yfiles module
- view-editor
- yfiles-umd modules
- view-editor, view-table, view
- Legacy UMD name
- yfiles.input.ReparentNodeHandler
See Also
Properties
Gets or sets the event recognizer that determines whether to reparent a node.
Remarks
The default is SHIFT_IS_DOWN
Signature Details
function(eventSource: any, evt: EventArgs) : boolean
A callback that recognizes events.
Given a sender and an event argument, delegates decide whether the event is treated as a match depending on the context.
Parameters
- eventSource - any
- The source of the event.
- evt - EventArgs
- The arguments of the event to be decided to handle.
Returns
- boolean
true
if theevt
is considered to be handled.
See Also
Methods
Determines whether the current gesture that can be determined through the context is a reparent gesture.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IInputModeContext
- The context that provides information about the user input.
- node - INode
- The node that will possibly be reparented.
Returns
- ↪boolean
- Whether this is a reparenting gesture.
See Also
Implements
Determines whether the provided node may be reparented to a newParent
.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IInputModeContext
- The context that provides information about the user input.
- node - INode
- The node that will be reparented.
- newParent - INode
- The potential new parent or
null
. Can be a group or a non-group node.
Returns
- ↪boolean
- Whether
newParent
is a valid new parent fornode
.
See Also
Implements
Performs the actual reparenting after the reparent gesture has been finalized.
Remarks
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IInputModeContext
- The context that provides information about the user input.
- node - INode
- The node that will be reparented.
- newParent - INode
- The potential new parent or
null
. Can be a group or a non-group node.
See Also
Implements
Determines whether the user may detach the given node from its current parent in order to reparent it.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- context - IInputModeContext
- The context that provides information about the user input.
- node - INode
- The node that is about to be detached from its current parent.
Returns
- ↪boolean
- Whether the node may be detached and reparented.