This class is used by EdgeRouter to provide routing details for the edges of the graph.
Remarks
An EdgeRouterEdgeDescriptor instance can be specified individually for single edges with edgeDescriptors.
This class is designed such that it allows future additions of new getter methods.
Default Values of Properties
curveShortcuts | false | Curved edges do not shortcut. |
curveUTurnSymmetry | 0 | The symmetry of u-turns is not specifically optimized. |
minimumEdgeDistance | 3.0 | |
minimumFirstSegmentLength | 5.0 | |
minimumLastSegmentLength | 10.0 | |
minimumNodeCornerDistance | 3.0 | |
monotonicPathRestriction | NONE
| No path restrictions are used. |
preferredOctilinearSegmentLength | 30 | |
routingStyle | ORTHOGONAL
|
Type Details
- yFiles module
- algorithms
See Also
Constructors
Creates a new instance of an EdgeRouterEdgeDescriptor with the default settings.
Parameters
A map of options to pass to the method.
- minimumFirstSegmentLength - number
- The minimum length of the first segment of the edge path (at the source node). This option sets the minimumFirstSegmentLength property on the created object.
- minimumLastSegmentLength - number
- The minimum length of the last segment of the edge path (at the target node). This option sets the minimumLastSegmentLength property on the created object.
- minimumEdgeDistance - number
- The minimum distance between a pair of edges. This option sets the minimumEdgeDistance property on the created object.
- minimumNodeCornerDistance - number
- The minimum distance that the edge should maintain from node corners when entering or leaving the node. This option sets the minimumNodeCornerDistance property on the created object.
- monotonicPathRestriction - MonotonicPathRestrictions
- The monotonic path restrictions that should be applied. This option sets the monotonicPathRestriction property on the created object.
- routingStyle - EdgeRouterRoutingStyle
- The routing style for the edge associated with this descriptor. This option sets the routingStyle property on the created object.
- edgeRouterCosts - EdgeRouterCosts
- The EdgeRouterCosts used for this edge. This option either sets the value directly or recursively sets properties to the instance of the edgeRouterCosts property on the created object.
- directGroupContentEdgeRouting - boolean
- Whether or not this edge is routed directly to a group node's border if it connects the group node with one of its descendants. This option sets the directGroupContentEdgeRouting property on the created object.
- intermediateRoutingPoints - IEnumerable<IPoint>
- The list of intermediate IPoints that need to lie on the edge route. This option sets the intermediateRoutingPoints 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.
- 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.
- 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 that determines how edge paths connect at the target side of the edge. This option sets the targetCurveConnectionStyle property on the created object.
- preferredOctilinearSegmentLength - number
- The preferred length of non-orthogonal, octilinear segments. This option sets the preferredOctilinearSegmentLength property on the created object.
- maximumOctilinearSegmentRatio - number
- The maximum ratio between the horizontal/vertical part of a segment and the non-orthogonal, octilinear part. This option sets the maximumOctilinearSegmentRatio property on the created object.
Properties
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.
Property Value
true
if the bends are interpreted as cubic bezier control points, false
otherwiseGets 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.
Property Value
true
, if curved edges may shortcut in favor of more direct curves, false
, otherwiseSee 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.
Property Value
[0,1]
, where a higher value means that symmetric turns are preferredThrows
- 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 whether or not this edge is routed directly to a group node's border if it connects the group node with one of its descendants.
Remarks
When enabled, the edge will connect to the inner side of the group node's border instead of leaving the group node and connect from outside.
LayoutPortCandidates are supported for direct content edges, including fixed LayoutPortCandidates. Note that, for example, a candidate with direction TOP at the side of the enclosing group node means that the edge connects to the upper group node border from inside and never leaves the group node.
Default Value
false
.Property Value
true
if the edge is routed directly, false
otherwiseSample Graphs
Gets or sets the EdgeRouterCosts used for this edge.
Remarks
Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the given costs are
null
See Also
Gets or sets the list of intermediate IPoints that need to lie on the edge route.
Remarks
Default Value
null
.The route does not obey any intermediate points.
Property Value
null
if there are no intermediate pointsSee Also
Gets or sets the maximum ratio between the horizontal/vertical part of a segment and the non-orthogonal, octilinear part.
Remarks
When octilinear segments are added to an edge path, corners between horizontal and vertical segments are cut and replaced by the new segment. This ratio describes the cutting points on a segment. If it is zero, the route stays orthogonal. The value cannot be larger than 0.5
because there may be another non-orthogonal segment at the other side of the segment. For long orthogonal segments the length of the octilinear segment is determined by the value of property preferredOctilinearSegmentLength.
The maximum octilinear segment ratio must be between 0
and 0.5
.
Default Value
0.3
.Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the maximum ratio is negative or greater than
0.5
See Also
Sample Graphs
Gets or sets the minimum distance between a pair of edges.
Remarks
0
. If a negative value is given as input, the default value, i.e., 3.0
, will be used instead.Default Value
3.0
.Property Value
Sample Graphs
Gets or sets the minimum length of the first segment of the edge path (at the source node).
Remarks
0
. If a negative value is given as input, the default value, i.e., 5.0
, will be used instead.Default Value
5.0
.Property Value
Sample Graphs
Gets or sets the minimum length of the last segment of the edge path (at the target node).
Remarks
0
. If a negative value is given as input, the default value, i.e., 10.0
, will be used instead.Default Value
10.0
.Property Value
Sample Graphs
Gets or sets the minimum distance that the edge should maintain from node corners when entering or leaving the node.
Remarks
0
. If a negative value is given as input, the default value, i.e., 3.0
, will be used instead.Default Value
3.0
.Property Value
Sample Graphs
Gets or sets the monotonic path restrictions that should be applied.
Remarks
Monotonic path restrictions imply that (ideally) the vertical and/or horizontal segments of an edge path are directed from the source node towards the target node without ever changing their direction back towards the source node.
If an unknown restriction is specified, NONE will be used instead.
Default Value
Property Value
Gets or sets the preferred length of non-orthogonal, octilinear segments.
Remarks
If there is not enough space to use this preferred length, the segments may also be shorter.
The preferred length of non-orthogonal, octilinear segments has to be greater than or equal to 0
.
Default Value
30
.Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the preferred octilinear segment length is negative
See Also
Sample Graphs
Gets or sets the routing style for the edge associated with this descriptor.
Gets or sets the style which determines how curved edge paths connect at the source side of the edge.
Property Value
See Also
Sample Graphs
Gets or sets the style that determines how edge paths connect at the target side of the edge.
Property Value
See Also
Sample Graphs
Methods
Creates a copy of this EdgeRouterEdgeDescriptor instance.
Returns
- ↪EdgeRouterEdgeDescriptor
- a copy of this EdgeRouterEdgeDescriptor instance