C

RoutingStyleDescriptor

This descriptor class is part of the HierarchicalLayoutEdgeDescriptor and specifies the routing style for different types of edges in the HierarchicalLayout.
Inheritance Hierarchy

Members

No filters for this type

Constructors

Creates a new RoutingStyleDescriptor instance with the given routing style for all edges and, optionally, also specifying whether the resulting path should consist of cubic bezier control points.

Parameters

routingStyle?: HierarchicalLayoutRoutingStyle
An optional routing style. The default value is ORTHOGONAL.
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.
This style is used for routing U-turns of common edges (i.e., edges that are neither self-loops nor same-layer edges). A U-turn is a non-monotonic part of the edge route that is required for reversed edges if option backLoopRouting is enabled or in some other scenarios with port constraints/candidates.
conversionfinal

Property Value

one of the predefined routing styles
Gets or sets whether or not the points of the resulting edge path represent cubic bezier control points.
  • 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.
This feature is useful when the visualization of the edge draws bezier curves instead of polyline paths.
final

Property Value

true if the bends are interpreted as cubic bezier control points, false otherwise

Default Value

The default value is: 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.

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.

If symmetric u-turn curves are preferred, enabling this property may be beneficial. For example, creating a perfectly symmetric u-turn curve may require to cross an additional edge.
This setting only affects edges with a CURVED edge routing style. It is not possible to precisely predict the impact of this setting for the general case. Usually, the effect of this property can mainly be observed for long edges close to the exterior of large graphs.
final

Property Value

true, if curved edges may shortcut in favor of more direct curves, false, otherwise

Default Value

The default value is: false
Curved edges do not shortcut.

Sample Graphs

ShownSetting: Curve shortcuts are disabled

See Also

API
CURVED
Gets or sets how symmetric u-turn parts of CURVED routes should preferably be.

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.

The difference to value 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.
This setting only affects edges with a CURVED edge routing style.
final

Property Value

the symmetry preference for u-turns of curved edges within interval [0,1], where a higher value means that symmetric turns are preferred

Throws

Exception ({ name: 'ArgumentError' })
if the given symmetry value is negative or larger than one

Default Value

The default value is: 0
The symmetry of u-turns is not specifically optimized.

Sample Graphs

ShownSetting: 0.0

See Also

API
CURVED
Gets or sets the default routing style for edges that have no individual routing style.
conversionfinal

Property Value

one of the predefined routing styles
Gets or sets the routing style for grouped edges at the common segments.
More precisely, grouped edges are routed in a bus-style fashion (i.e., the paths of the edges will share a common edge segment) and this option allows to specify the routing style at the bus.
conversionfinal

Property Value

one of the predefined routing styles
Gets or sets the routing style for same-layer edges.
A same-layer edge is an edge whose source/target are assigned to the same layer.
conversionfinal

Property Value

one of the predefined routing styles
Gets or sets the routing style for self-loops.
conversionfinal

Property Value

one of the predefined routing styles
Gets or sets the style which determines how curved edge paths connect at the source side of the edge.
When specifying style ORGANIC, the source port may end up not being on the side of the node pointing in the main layout direction anymore. For example, the port may be moved to the left or right side of the node for the default top-to-bottom layout orientation.
This setting only affects the source side of edges with a CURVED edge routing style.
conversionfinal

Property Value

one of the predefined curve connection styles

Default Value

The default value is: CurveConnectionStyle.KEEP_PORT
The hierarchical source port and the first segment is kept.

Sample Graphs

ShownSetting: Curved edges with the source and target ports kept as they are in a hierarchical layout

See Also

API
targetCurveConnectionStyle
Gets or sets the style which determines how curved edge paths connect at the target side of the edge.
When specifying style ORGANIC, the target port may end up not being on the side of the node pointing against the main layout direction anymore. For example, the port may be moved to the left or right side of the node for the default top-to-bottom layout orientation.
This setting only affects the target side of edges with a CURVED edge routing style.
conversionfinal

Property Value

one of the predefined curve connection styles

Default Value

The default value is: CurveConnectionStyle.KEEP_PORT
The hierarchical target port and the last segment is kept.

Sample Graphs

ShownSetting: Curved edges with the source and target ports kept as they are in a hierarchical layout

See Also

API
sourceCurveConnectionStyle