- I
- I
Remarks
This stage converts given TemporaryGroupDescriptors into a valid, temporary grouping structure that is visible for the coreLayout and is obeyed by it if it supports grouped graphs.
This stage works as follows:
- A graph grouping is derived from the given temporary group descriptors . All nodes with the same descriptor are assigned to a newly created group node that is inserted into the graph.
- The coreLayout 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 coreLayout sees both, the newly inserted groups and the old, existing ones and does not distinguish among them.
Default Values of Properties
| Name | Default |
|---|---|
| coreLayout | null |
See Also
Developer's Guide
API
- temporaryGroups, TemporaryGroupDescriptor, INSERTED_GROUP_NODE_DATA_KEY
Members
Constructors
Creates a new TemporaryGroupInsertionStage with the given layout algorithm as coreLayout.
Parameters
- coreLayout?: ILayoutAlgorithm
- The core layout algorithm
Properties
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Property Value
Default Value
Defined in
LayoutStageBase.coreLayoutGets or sets a value that determines whether this stage should do anything but execute the coreLayout.
By default, when constructed, stages should be enabled. Users may disable a stage's functionality by setting this property to false.
Stages that can guarantee that the graph will not change can choose to not even execute the coreLayout when disabled.
Defined in
LayoutStageBase.enabledMethods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Parameters
- graph: LayoutGraph
- The graph to apply the layout to.
Defined in
LayoutStageBase.applyLayoutCreates temporary group nodes based on the sub-graphs defined by the temporary group descriptors , executes the core layout algorithm, and, finally, removes the temporary group nodes.
createLayoutData
(graph: LayoutGraph): TemporaryGroupInsertionData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the TemporaryGroupInsertionStage.
createLayoutData
(graph: LayoutGraph): TemporaryGroupInsertionData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>Parameters
- graph: LayoutGraph
- the graph that determines the generic type arguments of the created layout data
Return Value
- TemporaryGroupInsertionData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>
- an instance of layout data that can be used to perform item-specific configurations for the given TemporaryGroupInsertionStage.
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the TemporaryGroupInsertionStage.
LayoutExecutor type is available at runtime.Parameters
- graph?: IGraph
- the graph that determines the generic type arguments of the created layout data
Return Value
- TemporaryGroupInsertionData<INode, IEdge, ILabel, ILabel>
- an instance of layout data that can be used to perform item-specific configurations for the given TemporaryGroupInsertionStage.
Constants
A data key that this stage uses for marking the inserted group nodes.
true is assigned to a group node if it was inserted by this stage, or false otherwise.
The algorithm temporarily adds an IMapper<K, V> that is registered with this key and marks inserted group nodes. More precisely, for each inserted group node get returns true. It is only available during the processing of this stage and automatically removed at the end.