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.
Type Details
- yFiles module
- algorithms
Constructors
Creates a new MinimumNodeSizeStage instance using the given optional coreLayout and minimum width and height for the nodes.
Parameters
A map of options to pass to the method.
- 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
. - 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
Methods
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
Resizes all nodes that are smaller than the specified minimum size to that minimum size, executes the coreLayout and restores the original sizes afterwards.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- The input graph