C

GroupHidingStage

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

NameDefaultDescription
coreLayoutnull
hidingEmptyGroupNodestrue
All group nodes will be hidden.
resetEdgePathsfalse
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.

Parameters

coreLayout?: ILayoutAlgorithm
The core layout algorithm.

Properties

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
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
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

Default Value

The default value is: GroupBoundsCalculator
Gets or sets whether or not empty group nodes, i.e., group nodes without children, will be hidden by this stage.
final

Property Value

true if all group nodes will be hidden, false if only group nodes with children will be hidden

Default Value

The default value is: true
All group nodes will be hidden.
Gets or sets whether or not this stage resets the paths of edges incident to group nodes.
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 otherwise

Default 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.
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.
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