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
| Name | Default | Description |
|---|---|---|
| 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 | MonotonicPathRestrictions.NONE | No path restrictions are used. |
| preferredOctilinearSegmentLength | 30 | |
| routingStyle | EdgeRouterRoutingStyle.ORTHOGONAL |
See Also
Developer's Guide
API
- edgeDescriptors
Members
Constructors
Creates a new instance of an EdgeRouterEdgeDescriptor with the default settings.
Parameters
Properties
- 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.
Property Value
true if the bends are interpreted as cubic bezier control points, false otherwiseDefault Value
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.
Property Value
true, if curved edges may shortcut in favor of more direct curves, false, otherwiseDefault Value
Sample Graphs
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.
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.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
Default Value
Sample Graphs
0.0See Also
API
- CURVED
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.
Property Value
true if the edge is routed directly, false otherwiseDefault Value
Sample Graphs
falseGets or sets the EdgeRouterCosts used for this edge.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the given costs are
null
See Also
Developer's Guide
API
- BALANCED_OPTIMIZATION, EDGE_BENDS_OPTIMIZATION, EDGE_CROSSINGS_OPTIMIZATION, EDGE_LENGTHS_OPTIMIZATION
Gets or sets the list of intermediate IPoints that need to lie on the edge route.
Property Value
null if there are no intermediate pointsDefault Value
See Also
API
- buses
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.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the maximum ratio is negative or greater than
0.5
Default Value
Sample Graphs
0.3, the octilinear parts from left and right both cover a third of the horizontal distanceSee Also
Developer's Guide
API
- OCTILINEAR, preferredOctilinearSegmentLength
0. If a negative value is given as input, the default value, i.e., 3.0, will be used instead.Property Value
Default Value
Sample Graphs
3.0See Also
Developer's Guide
0. If a negative value is given as input, the default value, i.e., 5.0, will be used instead.Property Value
Default Value
Sample Graphs
10See Also
Developer's Guide
0. If a negative value is given as input, the default value, i.e., 10.0, will be used instead.Property Value
Default Value
Sample Graphs
10See Also
Developer's Guide
0. If a negative value is given as input, the default value, i.e., 3.0, will be used instead.Property Value
Default Value
Sample Graphs
3.0See Also
Developer's Guide
Gets or sets the monotonic path restrictions that should be applied.
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.
Property Value
Default Value
See Also
Developer's Guide
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.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the preferred octilinear segment length is negative
Default Value
Sample Graphs
10See Also
Developer's Guide
API
- OCTILINEAR, maximumOctilinearSegmentRatio
Gets or sets the routing style for the edge associated with this descriptor.
Property Value
Default Value
See Also
Developer's Guide