This class is a default IDrawingDistanceCalculator implementation that is used by HierarchicalLayout to configure the ICoordinateAssigner.
Implements
Inheritance Hierarchy
See Also
Developer's Guide
Members
No filters for this type
Constructors
Creates a new instance of DrawingDistanceCalculator with default settings.
Creates a new instance of DrawingDistanceCalculator with default settings.
Parameters
Properties
If this option is enabled, the minimum distance between two adjacent edges is the minimum of the current minimum edge distance and the distance of the edges' source/target points.
final
Property Value
true if an adaptive minimum distance should be used, false otherwiseDefault Value
The default value is: true
An adaptive minimum distance is used.
This option is automatically set by the layout algorithm if option CoordinateAssigner.nodeCompaction or CoordinateAssigner.labelCompaction is enabled.
final
Property Value
true if compaction is enabled, false otherwiseDefault Value
The default value is: false
Compaction is disabled.
Minimum distance should be greater than
0.final
Property Value
the given minimum distance
Throws
- Exception ({ name: 'ArgumentError' })
- if the minimum distance is negative
Default Value
The default value is: 0d
Sample Graphs
Shown Setting: Minimum edge to edge distance
10Gets or sets the minimum distance between two LayoutNodes.
Gets or sets the minimum distance between two LayoutNodes.
Minimum distance should be greater than
0.final
Property Value
the minimum distance
Throws
- Exception ({ name: 'ArgumentError' })
- if the minimum distance is negative
Default Value
The default value is: 0d
Sample Graphs
Shown Setting: Minimum node to node distance
30Gets or sets the minimum distance between a LayoutNode and a (non-adjacent) LayoutEdge.
Gets or sets the minimum distance between a LayoutNode and a (non-adjacent) LayoutEdge.
Minimum distance should be greater than
0.final
Property Value
the minimum distance
Throws
- Exception ({ name: 'ArgumentError' })
- if the minimum distance is negative
Default Value
The default value is: 0d
Sample Graphs
Shown Setting: Minimum node to edge distance
15Methods
Parameters
- graph: LayoutGraph
- layoutContext: HierarchicalLayoutContext
getMinimumDistance
(graph: LayoutGraphlayer: HierarchicalLayoutLayerlayoutContext: HierarchicalLayoutContextleft: LayoutNode | nullright: LayoutNode | null): numberDetermines the minimum distance between two LayoutNodes of the same layer.
getMinimumDistance
(graph: LayoutGraph
layer: HierarchicalLayoutLayer
layoutContext: HierarchicalLayoutContext
left: LayoutNode | null
right: LayoutNode | null
): numberDetermines the minimum distance between two LayoutNodes of the same layer.
Parameters
- graph: LayoutGraph
- The input graph
- layer: HierarchicalLayoutLayer
- The layer object that will be used during subsequent calls
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext used for querying information
- left: LayoutNode | null
- The left of the two LayoutNodes whose minimum distance is to be determined or
nullif only the left border of the right LayoutNode is of interest - right: LayoutNode | null
- The right of the two LayoutNodes whose minimum distance is to be determined or
nullif only the right border of the left LayoutNode is of interest
Return Value
- number
- The minimum distances between LayoutNodes of the same layer