This class is used by HierarchicLayoutEdgeLayoutDescriptor to specify the routing style for different types of edges.
Default Values of Properties
createControlPoints | false | Each point is a normal polyline bend point. |
curveShortcuts | false | Curved edges do not shortcut. |
curveUTurnSymmetry | 0 | The symmetry of u-turns is not specifically optimized. |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.hierarchic.RoutingStyle
See Also
Constructors
Creates a new instance of a HierarchicLayoutRoutingStyle with the default values.
Parameters
A map of options to pass to the method.
- backLoopRoutingStyle - HierarchicLayoutEdgeRoutingStyle
The routing style for back-loop edges. This option sets the backLoopRoutingStyle property on the created object.
- edgeGroupRoutingStyle - HierarchicLayoutEdgeRoutingStyle
The routing style for grouped edges at the common segments. This option sets the edgeGroupRoutingStyle property on the created object.
- defaultEdgeRoutingStyle - HierarchicLayoutEdgeRoutingStyle
The default routing style for edges that have no individual routing style. This option sets the defaultEdgeRoutingStyle property on the created object.
- sameLayerEdgeRoutingStyle - HierarchicLayoutEdgeRoutingStyle
The routing style for same-layer edges. This option sets the sameLayerEdgeRoutingStyle property on the created object.
- selfLoopRoutingStyle - HierarchicLayoutEdgeRoutingStyle
The routing style for self-loops. This option sets the selfLoopRoutingStyle property on the created object.
- sourceCurveConnectionStyle - CurveConnectionStyle
The style which determines how curved edge paths connect at the source side of the edge. This option sets the sourceCurveConnectionStyle property on the created object.
- targetCurveConnectionStyle - CurveConnectionStyle
The style which determines how curved edge paths connect at the target side of the edge. This option sets the targetCurveConnectionStyle property on the created object.
- curveShortcuts - boolean
Whether or not curved edges may shortcut and introduce additional edge crossings to make curves more direct and smoother. This option sets the curveShortcuts property on the created object.
- curveUTurnSymmetry - number
How symmetric u-turn parts of curved routes should preferably be. This option sets the curveUTurnSymmetry property on the created object.
- createControlPoints - boolean
Whether or not the points of the resulting edge path represent cubic bezier control points. This option sets the createControlPoints property on the created object.
HierarchicLayoutRoutingStyle
(routingStyle: HierarchicLayoutEdgeRoutingStyle, controlPointCreation?: boolean)Creates a new HierarchicLayoutRoutingStyle instance with the given routing style for each edge and, optionally, also specifying whether or not the resulting path should consist of cubic bezier control points.
Parameters
A map of options to pass to the method.
- routingStyle - HierarchicLayoutEdgeRoutingStyle
- one of the predefined routing styles
- controlPointCreation - boolean
true
if the resulting path should consist of cubic bezier control points,false
otherwise
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown routing style is given
Properties
Gets or sets the routing style for back-loop edges.
Remarks
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown routing style is given
See Also
Gets or sets whether or not the points of the resulting edge path represent cubic bezier control points.
Remarks
- Disabled (default): Each point of the path represents a normal polyline bend point.
- Enabled: Four consecutive points p1, p2, p3, p4 of the resulting edge path need to be interpreted such that p1 is the start point of the cubic bezier curve, p4 is the end point of it and p2, p3 are the two intermediate control points. If p4 is not the last point of the edge path it is at the same time the start point of the next curve. For example, points p1, p2, p3, p4, p5, p6, p7 form a path that consists of two curves: the curve defined by p1, p2, p3, p4 and the curve defined by p4, p5, p6, p7.
Default Value
false
.Each point is a normal polyline bend point.
Gets or sets whether or not curved edges may shortcut and introduce additional edge crossings to make curves more direct and smoother.
Remarks
In relation to nodes, labels and other edges, the curved and non-curved edges take the same route, for example, both might cross a certain other edge or pass a certain node on its left side. If this property is disabled (default), the curved edges adhere to this.
If enabled, however, curved edges may shortcut and cross additional edges. This can yield to a direct and possibly smoother curved route. Still, intersections with nodes, node labels and edge labels are not allowed.
Default Value
false
.Curved edges do not shortcut.
See Also
Sample Graphs
Gets or sets how symmetric u-turn parts of curved routes should preferably be.
Remarks
If this property is greater than zero
, the algorithm tries to achieve a more symmetric path for 180-degree turns (u-turns) by specifically handling them. Symmetric turns likely require more space compared to more direct variants. The value of this property must be within interval [0,1]
, where a higher value indicates more emphasis on symmetry and lower values that symmetry is not important.
This setting influences the symmetry of a single curved route and does not affect symmetry of multiple curves in relation to each other.
Default Value
0
.The symmetry of u-turns is not specifically optimized.
Throws
- Exception({ name: 'ArgumentError' })
- if the given symmetry value is negative or larger than one
See Also
Sample Graphs
0
might be perceived as being greater than the difference between other values. The reason is that with 0
, u-turns are not handled specifically at all.Gets or sets the default routing style for edges that have no individual routing style.
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown routing style is given
Gets or sets the routing style for grouped edges at the common segments.
Remarks
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown routing style is given
See Also
Gets or sets the routing style for same-layer edges.
Remarks
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown routing style is given
See Also
Gets or sets the routing style for self-loops.
Gets or sets the style which determines how curved edge paths connect at the source side of the edge.
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown connection style is given
See Also
Sample Graphs
Gets or sets the style which determines how curved edge paths connect at the target side of the edge.
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown connection style is given