This class is a default IDrawingDistanceCalculator implementation that is used by HierarchicalLayout to configure the ICoordinateAssigner.
Implements
- I
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 nodeCompaction or 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: 20.0d
Sample Graphs
ShownSetting: 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: 30.0d
Sample Graphs
ShownSetting: 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: 15.0d
Sample Graphs
ShownSetting: Minimum node to edge distance
15Methods
Disposes of internal data structures.
Disposes of internal data structures.
Implementations should release internally held data structures when they are not needed anymore.
Parameters
- graph: LayoutGraph
- the input graph that contains all elements that are used during the node placement
- layoutContext: HierarchicalLayoutContext
- the HierarchicalLayoutContext instance which provides access to the HierarchicalLayoutNodeContext and HierarchicalLayoutEdgeContext instances, as well as the layers instance that will be used during subsequent calls.
Implements
IDrawingDistanceCalculator.disposeDetermines the minimum distance between two LayoutNodes of the same layer.
Determines 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
- 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
- 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
Initializes internal data structures.
Initializes internal data structures.
Implementations may cache lengthy calculations in the initialization phase.
Parameters
- graph: LayoutGraph
- the input graph that contains all elements that are used during the node placement
- layoutContext: HierarchicalLayoutContext
- The HierarchicalLayoutContext instance which provides access to context information for the graph elements.