Interface used for implementations that recognize, approve and disapprove node reparenting gestures, as well as actually performs the reparenting.
Remarks
Related Programming Samples
- Reparent Handler
- Shows how reparenting of nodes can be customized.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.IReparentNodeHandler
See Also
Methods
Determines whether the current gesture that can be determined through the context is a reparent gesture.
Parameters
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
Determines whether the provided node may be reparented to a newParent
.
Parameters
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
Performs the actual reparenting after the reparent gesture has been finalized.
Remarks
Parameters
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
Determines whether the user may detach the given node from its current parent in order to reparent it.
Parameters
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.
See Also
Static Methods
Creates an implementation of the interface IReparentNodeHandler from the given definition.
Remarks
Parameters
A map of options to pass to the method.
- isReparentGesture - function(IInputModeContext, INode):boolean
Determines whether the current gesture that can be determined through the context is a reparent gesture.
This property holds the implementation for isReparentGesture.
- shouldReparent - function(IInputModeContext, INode):boolean
Determines whether the user may detach the given node from its current parent in order to reparent it.
This property holds the implementation for shouldReparent.
- isValidParent - function(IInputModeContext, INode, INode):boolean
Determines whether the provided node may be reparented to a
newParent
.This property holds the implementation for isValidParent.
- reparent - function(IInputModeContext, INode, INode):void
Performs the actual reparenting after the reparent gesture has been finalized.
This property holds the implementation for reparent.
Returns
- ↪IReparentNodeHandler
- An instance of the IReparentNodeHandler interface based on the given definition.