An ILayoutStage that hides the group nodes of hierarchically grouped graphs.
Remarks
This stage removes all group nodes and adjacent edges from the graph before passing it to the coreLayout. After the core layout algorithm has arranged the graph, the hidden elements will be reinserted.
This stage is used by layout algorithms that cannot handle grouped graphs.
Default Values of Properties
hidingEmptyGroupNodes | true | All group nodes will be hidden. |
resetEdgePaths | false | This stage does not reset the path of edges incident to group nodes. |
Type Details
- yFiles module
- algorithms
Constructors
Creates an instance of GroupHidingStage with an optional coreLayout.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- The core layout algorithm.
- resetEdgePaths - boolean
- Whether or not this stage resets the paths of edges incident to group nodes. This option sets the resetEdgePaths property on the created object.
- hidingEmptyGroupNodes - boolean
- Whether or not empty group nodes, i.e., group nodes without children, will be hidden by this stage. This option sets the hidingEmptyGroupNodes property on the created object.
- groupBoundsCalculator - ILayoutGroupBoundsCalculator
- The ILayoutGroupBoundsCalculator instance for calculating the sizes of group nodes. This option sets the groupBoundsCalculator property on the created object.
- enabled - boolean
Properties
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Gets or sets a value that determines whether this stage should do anything but execute the coreLayout.
Remarks
By default, when constructed, stages should be enabled. Users may disable a stage's functionality by setting this property to false
.
Stages that can guarantee that the graph will not change can choose to not even execute the coreLayout when disabled.
Implements
Gets or sets the ILayoutGroupBoundsCalculator instance for calculating the sizes of group nodes.
Remarks
Default Value
GroupBoundsCalculator.Property Value
Gets or sets whether or not empty group nodes, i.e., group nodes without children, will be hidden by this stage.
Default Value
true
.All group nodes will be hidden.
Property Value
true
if all group nodes will be hidden, false
if only group nodes with children will be hiddenGets or sets whether or not this stage resets the paths of edges incident to group nodes.
Remarks
Default Value
false
.This stage does not reset the path of edges incident to group nodes.
Property Value
true
if this stage resets the path of edges incident to group nodes, false
otherwiseMethods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- The graph to apply the layout to.
Implements
Calculates the layout based on the given core layout algorithm.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph