TemporaryGroupNodeInsertionStage is useful if nodes should be treated by layout algorithms as if they were actually grouped without the need to manually create a grouped graph for the layout process.
Remarks
This stage converts given TemporaryGroupDescriptors into a valid, temporary grouping structure that is visible for the core layout algorithm and is obeyed by it if it supports grouped graphs.
This stage works as follows:
- A graph grouping is derived from the given temporar group descriptors. All nodes with the same descriptor are assigned to a newly created group node that is inserted into the graph.
- The core layout algorithm is executed. It works on the graph containing the inserted group nodes.
- The temporarily inserted group nodes are removed, restoring the original graph structure.
In case that the input graph is already grouped, the following should be noted:
- All nodes in a temporary group must be on the same hierarchy level, except for the case that group nodes are themselves part of the temporary group. However, if a group node is in a temporary group, then all its descendants need to be assigned to the same temporary group too. Otherwise, an exception is thrown.
- For hierarchically nested temporary groups, all nodes that belong to a group of this hierarchy have to be either contained within the same original group or no group at all. The resulting structure containing the original group nodes and temporary groups inserted by this stage is always hierarchically nested, i.e., there are no partly intersecting group nodes.
- The core layout algorithm sees both, the newly inserted groups and the old, existing ones and does not distinguish among them.
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.TemporaryGroupNodeInsertionStage
See Also
Constructors
Creates a new TemporaryGroupNodeInsertionStage with the given layout algorithm as core layout algorithm.
Parameters
A map of options to pass to the method.
- core - ILayoutAlgorithm
- the core layout algorithm
Properties
Gets or sets the core layout algorithm that is wrapped by this stage.
Methods
Creates temporary group nodes based on the sub-graphs define by the temporary group descriptors, executes the core layout algorithm, and, finally, removes the temporary group nodes.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Implements
Invokes the layout process of the core layout algorithm.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Defined in
Constants
A data provider key that this stage uses for marking the inserted group nodes.
Remarks
true
. It is only available during the processing of this stage and automatically removed at the end.Domain | YNode | the nodes of the input graph |
Values | boolean | whether or not the group node was inserted by this stage |
A data provider key for specifying temporary groups of the input graph.
Remarks
Domain | YNode | the nodes of the input graph |
Values | TemporaryGroupDescriptor | the temporary group descriptor of the node or null if the node should not be part of a temporary group |