Specifies custom data for the PlaceNodesAtBarycenterStage.
Examples
The following example shows how to create a new instance of PlaceNodesAtBarycenterStageData and use it with a PlaceNodesAtBarycenterStage:
In many cases the complete initialization of PlaceNodesAtBarycenterStageData 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.PlaceNodesAtBarycenterStageData
Constructors
Creates a new instance of PlaceNodesAtBarycenterStageData which helps configuring PlaceNodesAtBarycenterStage.
Parameters
A map of options to pass to the method.
- affectedNodes - ItemCollection<INode>
The collection of nodes that should be affected by the PlaceNodesAtBarycenterStage. This option sets the affectedNodes property on the created object.
- affectedNodesSizes - ItemMapping<INode,ISize>
The mapping from the affected nodes to their sizes. This option sets the affectedNodesSizes property on the created object.
Properties
Gets or sets the collection of nodes that should be affected by the PlaceNodesAtBarycenterStage.
Remarks
Examples
Defining the subset of nodes that should be temporarily hidden can be done in various ways, mostly depending on which option is more convenient for a particular use case. You can use the ItemCollection<TItem>'s source property to use any .NET collection or IEnumerable<T>:
Alternatively, ItemCollection<TItem> also has an items property, which is a collection that already exists, in case the items may have to be added one by one. This can be more convenient than defining an own list and setting it to source:
A powerful option that doesn't use a collection is to use the delegate to set a custom delegate that returns for every node whether it is contained in the set or not:
See Also
Gets or sets the mapping from the affected nodes to their sizes.
Remarks
See Also
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.