This ITreeLayoutNodePlacer places the children of a local root in groups.
Remarks
The groups are determined by the grouping of the edges that connect the children to its root. The placement of the groups is specified by a ITreeLayoutNodePlacer which will consider grouped children as one child. The children within a group are placed by another ITreeLayoutNodePlacer.
Type Details
- yfiles module
- layout-tree
- yfiles-umd modules
- layout-orthogonal-compact, layout-orthogonal, layout-tree, layout
- Legacy UMD name
- yfiles.tree.GroupedNodePlacer
See Also
Constructors
Creates a new GroupedNodePlacer instance.
Parameters
A map of options to pass to the method.
- groupPlacer - ITreeLayoutNodePlacer
- the ITreeLayoutNodePlacer which places the child groups
- childPlacer - ITreeLayoutNodePlacer
- the ITreeLayoutNodePlacer which places the children within their group
Methods
Creates a IProcessor that prepares the graph for edge grouping.
Remarks
In a pre-processing step, the IProcessor inserts a dummy node for each edge group and connects it to the local root and the edges of the according group. The child node placer is assigned to those dummy nodes and will arrange them during the layout calculation.
The changes to the graph are restored in a post-processing step.
Parameters
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
- the IProcessor responsible for preparing the graph
See Also
Implements
Delegates to the ITreeLayoutNodePlacer responsible for arranging the nodes in one group.
Parameters
A map of options to pass to the method.
- localRoot - YNode
- the local root node
- connectorMap - IDataMap
- the map 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) : SubtreeShapePlaces the groups of SubtreeShapes according to their group IDs.
Parameters
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 merged SubtreeShapes of the local root and its children