A LeafNodePlacer creates a SubtreeShape for a leaf node and routes its incoming edge at the target side.
Type Details
- yfiles module
- layout-tree
- yfiles-umd modules
- layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
- Legacy UMD name
- yfiles.tree.LeafNodePlacer
Constructors
Creates a new LeafNodePlacer instance with default settings.
Methods
Creates an optional IProcessor for pre- and post-processing.
Remarks
This implementation returns
null
. Hence, no pre- or post-processing is done.Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- layouter - TreeLayout
- the current TreeLayout instance
- graph - LayoutGraph
- the input graph
- currentRoot - YNode
- the root node handled by this ITreeLayoutNodePlacer
Returns
- ↪IProcessor
null
Implements
Does nothing because leaf nodes don't have children so there are no child connectors.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- localRoot - YNode
- the local root node
- connectorMap - IDataMap
- the map that must be used for storing the direction specifiers of the child nodes
Domain YNode a child node of the local root Values number the direction specifier assigned to the child node
Implements
placeSubtree
(nodeShapeProvider: IDataProvider, subtreeShapeProvider: IDataProvider, graph: LayoutGraph, localRoot: YNode, parentConnectorDirection: ParentConnectorDirection) : SubtreeShapeCreates a SubtreeShape for the local root node (a leaf node in this case) and adds target points to the incoming edge.
Remarks
The incoming edge is routed according to possibly assigned PortConstraints.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- nodeShapeProvider - IDataProvider
- the IDataProvider for obtaining an initial shape of the root node
Domain YNode Values SubtreeShape the shape of the node - subtreeShapeProvider - IDataProvider
- the IDataProvider for accessing the pre-calculated shapes of the subtrees
Domain YNode Values SubtreeShape the shape of the subtree rooted at the node - graph - LayoutGraph
- the input graph
- localRoot - YNode
- the root of the subtree that should be arranged by this method
- parentConnectorDirection - ParentConnectorDirection
- the direction specifier for the connector of the local root node to its parent node
Returns
- ↪SubtreeShape
- the SubtreeShape of the leaf node including the connector