Specifies the layout data for the GenericPartitionGridStage.
Examples
The following example shows how to create a new instance of GenericPartitionGridStageData and use it with a GenericPartitionGridStage:
In many cases the complete initialization of GenericPartitionGridStageData can also be done in a single object initializer:
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.layout.GenericPartitionGridStageData
See Also
Constructors
Creates a new instance of GenericPartitionGridStageData which helps configuring GenericPartitionGridStage.
Parameters
A map of options to pass to the method.
- partitionGridData - PartitionGridData
The partitionGridData that allows to configure the PartitionGrid for the layout stage. This option sets the partitionGridData property on the created object.
- splitEdges - ItemCollection<IEdge>
The collection of edges that should not be considered when calculating the sub-components. This option sets the splitEdges property on the created object.
Properties
Gets or sets the partitionGridData that allows to configure the PartitionGrid for the layout stage.
Examples
The following sample shows how to assign nodes to partition grid cells simply via cell indices:
When used this way there is no need to create a PartitionGrid instance or work with it directly. For more flexibility, e.g. to use cells that span multiple columns or rows, the PartitionGrid can be used as well:
Gets or sets the collection of edges that should not be considered when calculating the sub-components.
Remarks
Examples
If only a few edges should be removed during the calculation of the sub-components, the easiest way is often to add them one by one via the items collection:
layoutData.splitEdges.items.add(edge1)
layoutData.splitEdges.items.add(edge2)
If you already have a collection or IEnumerable<T> for those edges, the source property is usually easier:
// Consider selected edges
layoutData.splitEdges = graphComponent.selection.selectedEdges
If it can be inferred directly from the edge itself whether it should be routed that way, a delegate is often most convenient:
layoutData.splitEdges = (edge) => edge.tag.isSplitEdge
Methods
Combines this instance with the given layout data.
Remarks
Parameters
A map of options to pass to the method.
- data - LayoutData
- The LayoutData to combine this instance with.
Returns
- ↪LayoutData
- The combined layout data.