The IPositionHandler implementation used in the context of IGraphs where there is a active hierarchy.
Remarks
This implementation delegates through to a simpler implementation that only deals with the geometric relocation of the node. In addition to that it finds the IReparentNodeHandler from the IInputModeContext to detect a reparenting gesture by the user. If such a gesture is recognized, the node can be moved freely until a valid new parent node is found. This implementation then temporarily sets that node as a new visual parent and highlight the node. When the gesture is finished, the reparent method is called to perform the actual reparenting.
In order to customize this default behavior, subclasses of this type can be decorated to the INodes in the graph.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.input.GroupingNodePositionHandler
Constructors
Initializes a new instance of the GroupingNodePositionHandler class.
Remarks
wrappedHandler
. If the given wrappedHandler
is null
an implementation of IPositionHandler is queried from the default node lookup to be used as delegate.Parameters
A map of options to pass to the method.
- node - INode
- The node to reposition.
- wrappedHandler - IPositionHandler
- The IPositionHandler to wrap. If omitted, this will be the default IPositionHandler for nodes.
Properties
Gets a view of the location of the item.
Gets or sets a value determining whether children of the moved node are implicitly moved with it.
Remarks
true
Gets or sets a value determining whether reparenting the moved node is enabled.
Remarks
true
Methods
Called by clients to indicate that the dragging has been canceled by the user.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the coordinate of the location property at the time of initializeDrag.
See Also
Implements
Called by clients to indicate that the repositioning has just been finished.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the location property at the time of initializeDrag.
- newLocation - Point
- The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location may or may not be modified to reflect the new value. This is the same value as delivered in the last invocation of handleMove
See Also
Implements
Called by clients to indicate that the element has been dragged and its position should be updated.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
- originalLocation - Point
- The value of the location property at the time of initializeDrag.
- newLocation - Point
- The coordinates in the world coordinate system that the client wants the handle to be at. Depending on the implementation the location may or may not be modified to reflect the new value.
See Also
Implements
Called by clients to indicate that the element is going to be dragged.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The context to retrieve information about the drag from.
See Also
Implements
Sets a temporary visual parent for the node during reparenting.
Remarks
Parameters
A map of options to pass to the method.
- context - IInputModeContext
- The current IInputModeContext.
- node - INode
- The node being reparented.
- parent - INode
- The temporary parent for the node.