An ILayoutStage that hides the group nodes of hierarchically grouped graphs.
Implements
- I
- I
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
| Name | Default | Description |
|---|---|---|
| coreLayout | null | |
| hidingEmptyGroupNodes | true | All group nodes will be hidden. |
| resetEdgePaths | false | This stage does not reset the path of edges incident to group nodes. |
See Also
Developer's Guide
Members
Show:
Constructors
Creates an instance of GroupHidingStage with an optional coreLayout.
Creates an instance of GroupHidingStage with an optional coreLayout.
Parameters
- coreLayout?: ILayoutAlgorithm
- The core layout algorithm.
Properties
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
final
Property Value
the core layout routine
Default Value
The default value is: null
Defined in
LayoutStageBase.coreLayoutGets or sets a value that determines whether this stage should do anything but execute the coreLayout.
Gets or sets a value that determines whether this stage should do anything but execute the coreLayout.
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.
final
Defined in
LayoutStageBase.enabledGets or sets the ILayoutGroupBoundsCalculator instance for calculating the sizes of group nodes.
Gets or sets the ILayoutGroupBoundsCalculator instance for calculating the sizes of group nodes.
For every group which is in its open state, the ILayoutGroupBoundsCalculator will be asked to calculate the bounds for the group's child nodes. The resulting size will be used during the ongoing layout calculation.
final
Property Value
the ILayoutGroupBoundsCalculator instance
Default Value
The default value is: GroupBoundsCalculator
final
Property Value
true if all group nodes will be hidden, false if only group nodes with children will be hiddenDefault Value
The default value is: true
All group nodes will be hidden.
Resetting an edge path removes all bends and moves the edge's port on a group to the center.
Since this stage may change the size of group nodes (see groupBoundsCalculator), keeping the original edge paths often produces weird routes for edges at group nodes.
final
Property Value
true if this stage resets the path of edges incident to group nodes, false otherwiseDefault Value
The default value is: false
This stage does not reset the path of edges incident to group nodes.
Methods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
This implementation checks the enabled state and when it's not enabled, will delegate to the coreLayout, directly. When the stage is enabled, all the work will be delegated to applyLayoutImpl, instead.
final
Parameters
- graph: LayoutGraph
- The graph to apply the layout to.
Defined in
LayoutStageBase.applyLayoutCalculates the layout based on the given core layout algorithm.
Calculates the layout based on the given core layout algorithm.
Before calling the core layout algorithm, group nodes and their adjacent edges will be hidden. After the layout has been calculated, GroupHidingStage will restore the graph.
The given graph will not be copied during the layout process and the layout will be immediately applied to the given graph.
protected
Parameters
- graph: LayoutGraph
- the input graph