The IPositionHandler implementation used in the context of IGraphs where there is an active hierarchy.
Implements
Inheritance 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 highlights the node. When the gesture is finished, the IReparentNodeHandler.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.
Members
Show:
Constructors
Initializes a new instance of the GroupingNodePositionHandler class.
Initializes a new instance of the GroupingNodePositionHandler class.
This implementation delegates the handling of the node's INode.layout changes to the provided
wrappedHandler. If the given wrappedHandler is null, an implementation of IPositionHandler is queried from the Graph.DEFAULT_NODE_LOOKUP to be used as delegate.Parameters
- node: INode
- The node to reposition.
- wrappedHandler?: IPositionHandler
- The IPositionHandler to wrap. If omitted, this will be the default IPositionHandler for nodes.
Properties
Default is
truefinal
Gets a view of the location of the item.
Gets a view of the location of the item.
Delegates to the wrapped IPositionHandler's IDragHandler.location.
readonlyfinal
Implements
IPositionHandler.locationGets or sets a value determining whether children of the moved node are implicitly moved with it.
Gets or sets a value determining whether children of the moved node are implicitly moved with it.
Default is
truefinal
Gets or sets a value determining whether reparenting the moved node is enabled.
Gets or sets a value determining whether reparenting the moved node is enabled.
Default is
truefinal
Methods
Parameters
- context: IInputModeContext
- originalLocation: Point
This is used to show the grouping hierarchy level a node would end in after finishing the reparenting gesture. Override this method with an empty implementation to not change the z-order of the dragged node during the gesture.
protected
Parameters
- context: IInputModeContext
- The current IInputModeContext.
- node: INode
- The node being reparented.
- parent: INode | null
- The temporary parent for the node.