The default IReparentNodeHandler implementation used by reparentNodeHandler.
Implements
- I
Remarks
It treats Ctrl key presses as reparent gestures. This can be configured using the reparentRecognizer property. By default, all nodes can be reparented to all other nodes.
See Also
Developer's Guide
Members
No filters for this type
Constructors
Properties
Gets or sets the event recognizer which is called by isReparentGesture to determine whether to reparent a node.
Gets or sets the event recognizer which is called by isReparentGesture to determine whether to reparent a node.
The default detects the current platform and delegates either to META_IS_DOWN (macOS) or CTRL_IS_DOWN (other platforms).
final
See Also
Developer's Guide
API
- isReparentGesture
Methods
Determines whether the current gesture that can be determined through the context is a reparent gesture.
Determines whether the current gesture that can be determined through the context is a reparent gesture.
By default, reparentRecognizer will be tested with the lastInputEvent.
Parameters
- context: IInputModeContext
- The context that provides information about the user input.
- node: INode
- The node that will possibly be reparented. May be irrelevant for the result.
Return Value
- boolean
- Whether this is a reparenting gesture.
Implements
IReparentNodeHandler.isReparentGestureDetermines whether the provided node may be reparented to a newParent.
Determines whether the provided node may be reparented to a
newParent.By default, all nodes are considered valid parents.
Parameters
- 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
nullfor the root (no parent). Can be a group or a non-group node.
Return Value
- boolean
- Whether
newParentis a valid new parent fornode.
Implements
IReparentNodeHandler.isValidParentPerforms the actual reparenting after the reparent gesture has been finalized.
Performs the actual reparenting after the reparent gesture has been finalized.
The default implementation sets the parent of
node to newParent and enlarges the parent to fit the reparented node.Parameters
- 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
nullfor the root (no parent). Can be a group or a non-group node.
Implements
IReparentNodeHandler.reparentDetermines whether the user may detach the given node from its current parent in order to reparent it.
Determines whether the user may detach the given node from its current parent in order to reparent it.
By default, all nodes may be detached.
Parameters
- 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.
Return Value
- boolean
- Whether the node may be detached and reparented.