documentationfor yFiles for HTML 2.6

TemporaryGroupNodeInsertionStage

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.

Inheritance Hierarchy
LayoutStageBase
TemporaryGroupNodeInsertionStage
Implemented Interfaces

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:

  1. 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.
  2. The core layout algorithm is executed. It works on the graph containing the inserted group nodes.
  3. 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

This stage is especially convenient if RecursiveGroupLayout should be applied but the graph is not grouped. This way a layout algorithm (or different ones) can be applied independently for different sub-graphs without manually grouping the graph only for the layout process. To map a specific ILayoutAlgorithm instance to a temporary group descriptor use recursiveGroupLayoutAlgorithm. It is then not necessary to use GROUP_NODE_LAYOUT_DP_KEY.

Constructors

Properties

Methods

Constants