A layout stage that can handle fixed nodes in hierarchically grouped graphs.
Remarks
This stage guarantees that a core layout algorithm will maintain the relative positions of nodes within the same group.
Also, this stage is responsible for routing edges that connect nodes belonging to hierarchically unrelated groups. More precisely, the stage temporarily replaces fixed group nodes (see FIXED_GROUP_NODES_DP_KEY) with normal nodes of the same size while the content of the groups is removed from the graph during layout.
The nodes are used as placeholders and are responsible for keeping the relations to the remaining graph elements. Edges that originate from the outside of the group node and terminate in its interior (inter-edges) are redirected such that they connect to the node that replaces the group.
After the layout process, the group nodes are restored and the stage inserts the content at the new group position (derived from the position of the associated node). The content itself (including the edges between content nodes) remains unchanged and is only relocated. Furthermore, the inter-edges are connected to their original source/target and the stage reroutes them using the specified inter-edge routing algorithm (see interEdgeRouter).
Default Values of Properties
interEdgeRouter | CompositeLayoutStage
| A |
interEdgeRoutingStyle | ADOPT
| Inter-edge routes will be adopted from the core layout algorithm. |
Type Details
- yfiles module
- router-polyline
- yfiles-umd modules
- layout-area, layout-multipage, layout-orthogonal-compact, layout, router-bus, router-polyline
- Legacy UMD name
- yfiles.layout.FixGroupLayoutStage
See Also
Constructors
Creates a new instance of FixGroupLayoutStage with an optional core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- The core layout algorithm.
- interEdgeRoutingStyle - InterEdgeRoutingStyle
The inter-edge routing style used by this layout stage. This option sets the interEdgeRoutingStyle property on the created object.
- interEdgeRouter - ILayoutAlgorithm
The edge routing algorithm that is applied to route the inter-edges. This option sets the interEdgeRouter property on the created object.
Properties
Gets or sets the core layout algorithm that is wrapped by this stage.
Gets or sets the edge routing algorithm that is applied to route the inter-edges.
Remarks
Default Value
Methods
Calculates the layout for the given graph, that is, prepares the graph by hiding the content of fixed group nodes for the core layout algorithm, executes it and, finally, restores the graph and routes inter-edges.
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 for selecting group nodes whose contents should keep their relative positions.
Remarks
true
for the group node or any of its ancestor (group) nodes.Domain | YNode | the group nodes of the input graph |
Values | boolean | true if the group node's content should be fixed, false otherwise |