This ILayoutStage offers generic support for partition grid structures.
Remarks
The stage performs the following steps:
- First it determines sub-components such that each component only contains nodes associated with the same grid cell. Nodes without associated grid cell are temporarily assigned to a suitable cell.
- Now this stage applies the specified core layout algorithm to each sub-component and, afterwards, reassembles the global partition grid structure. Since the sub-components do not contain nodes of different cells, the core layout algorithm doesn't require support for partition grid on its own.
- Finally, this stage routes edges that connect nodes of different sub-components by means of the specified inter-edge router. Note that such edges are temporarily hidden during the core layout runs.
Disabling property splitMultiCellComponents allows to switch to a mode where connected components are not split into smaller sub-components. Hence, a component may contain nodes of different partition cells and, thus, the specified core layout algorithm has to support partition grid structures by itself. In this case, this stage doesn't offer a generic partition grid support (since the core layout algorithm already has to support such structures). Instead it may speed up the layout calculation since the core layout algorithm is applied to different smaller graphs instead of a single, larger input graph.
Default Values of Properties
considerLabels | true | Node and edge labels are included in the bounds of the partition cells. |
interEdgeRouter | null | Inter-edges are routed as straight lines. |
interEdgesDpKey | AFFECTED_EDGES_DP_KEY
| |
splitMultiCellComponents | true | Components with nodes of different partition cells are split. |
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.GenericPartitionGridStage
See Also
Constructors
Creates a new instance using the given core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- the core layout algorithm
- considerLabels - boolean
Whether or not to take node and edge labels into account when calculating the bounding box of the partition cells. This option sets the considerLabels property on the created object.
- interEdgeRouter - ILayoutAlgorithm
The current edge routing algorithm for handling inter-edges. This option sets the interEdgeRouter property on the created object.
- interEdgesDpKey - Object
The key for marking the inter-edges to be routed. This option sets the interEdgesDpKey property on the created object.
- splitMultiCellComponents - boolean
Whether or not the algorithm should split connected components that have nodes associated with different partition cells. This option sets the splitMultiCellComponents property on the created object.
Properties
Gets or sets whether or not to take node and edge labels into account when calculating the bounding box of the partition cells.
Default Value
true
.Node and edge labels are included in the bounds of the partition cells.
See Also
Gets or sets the core layout algorithm that is wrapped by this stage.
Gets or sets the current edge routing algorithm for handling inter-edges.
Remarks
If option splitMultiCellComponents is enabled, components that contain nodes associated with different partition cells are split into sub-components. Edges that connect nodes of different sub-components are called inter-edges and routed with this edge routing algorithm.
It is required that a suitable selection key is specified. The same selection key must be used for setting the scope for the edge routing algorithm.
Default Value
null
.Inter-edges are routed as straight lines.
See Also
Gets or sets the key for marking the inter-edges to be routed.
Remarks
Default Value
AFFECTED_EDGES_DP_KEY.Throws
- Exception({ name: 'ArgumentError' })
- if the specified key is
null
See Also
Gets or sets whether or not the algorithm should split connected components that have nodes associated with different partition cells.
Remarks
If this option is enabled, such components are split into sub-components that only include nodes associated with the same grid cell. Hence, the core layout algorithm doesn't see the partition grid at all. Edges that connect nodes of different sub-components are temporarily hidden and routed afterwards by means of the inter-edge router.
If this option is disabled, the layout algorithm determines independent components and calls the core layout algorithm for each of them. Note that two connected components are only independent if there is no group node that contains a node of each of them and if the two sub-partition grids induced by the connected components do no have a common ColumnDescriptor or RowDescriptor. The core layout algorithm is called once for each independent component and, thus, has to support partition grid structures.
Default Value
true
.Components with nodes of different partition cells are split.
Methods
Starts the layout.
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 explicitly marking (some) edges that should not be considered when calculating the sub-components.
Remarks
Domain | Edge | |
Values | boolean | true if the edge should be considered when calculating the sub-components, false otherwise |