C

MinimumNodeSizeStage

MinimumNodeSizeStage enforces a given minimum width/height of the nodes of a graph during the layout process.

Remarks

It temporarily enlarges nodes whose width/height is below the specified minimum values.

This ILayoutStage is especially useful to prevent that the coreLayout has to handle zero-sized nodes or nodes with negative sizes.

Default Values of Properties

NameDefault
coreLayoutnull

Members

Show:

Constructors

Creates a new MinimumNodeSizeStage instance using the given optional coreLayout and minimum width and height for the nodes.

Parameters

coreLayout?: ILayoutAlgorithm
The core layout routine. The default value is null.
minimumWidth?: number
The minimum width of nodes that should be enforced. The default value is 1.0.
minimumHeight?: number
The minimum height of nodes that should be enforced. The default value is 1.0.

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

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.
Resizes all nodes that are smaller than the specified minimum size to that minimum size, executes the coreLayout and restores the original sizes afterwards.
protected

Parameters

graph: LayoutGraph
The input graph