PlaceNodesAtBarycenterStage temporarily hides the affected nodes, applies the specified core layout algorithm (if any) to the resulting graph and, finally, reinserts the hidden nodes by placing them on the barycenter of their neighbors using the specified node sizes.
Remarks
Default Values of Properties
considerGrouping | true | The grouping structure is considered. |
removeBends | true | Bends should be removed. |
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.PlaceNodesAtBarycenterStage
See Also
Constructors
Creates a new PlaceNodesAtBarycenterStage instance using the given core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- the core layout routine
- removeBends - boolean
Whether or not bends of edges incident to affected nodes should be removed. This option sets the removeBends property on the created object.
- resetPorts - boolean
Whether or not ports of edges incident to affected nodes should be set to the center of the corresponding nodes. This option sets the resetPorts property on the created object.
- considerGrouping - boolean
Whether or not the grouping structure should be considered. This option sets the considerGrouping property on the created object.
Properties
Gets or sets whether or not the grouping structure should be considered.
Remarks
If this option is enabled, the layout algorithm considers the hierarchic grouping structure as follows:
- The barycenter of an affected group depends on the coordinates of non-affected nodes outside the group that connect to nodes inside the group.
- The barycenter of affected nodes is automatically moved inside the bounding box of the contained parent group.
If this option is disabled, there is no special treatment of group nodes.
Default Value
true
.The grouping structure is considered.
Gets or sets the core layout algorithm that is wrapped by this stage.
Gets or sets whether or not bends of edges incident to affected nodes should be removed.
Default Value
true
.Bends should be removed.
See Also
Gets or sets whether or not ports of edges incident to affected nodes should be set to the center of the corresponding nodes.
Default Value
false
.Ports are not set to the center.
See Also
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 determining which nodes should be placed by this stage.
Domain | YNode | |
Values | boolean | true if the node should be placed by this stage, false otherwise |
A data provider key for specifying the size of affected nodes.
Domain | YNode | |
Values | YDimension | the size of the node |