PolylineLayoutStage extends the orthogonal edge paths with polyline segments.
Remarks
The current implementation only adds octilinear segments to all orthogonal edges. Non-orthogonal edges are completely ignored.
An octilinear segment is added between two consecutive vertical and horizontal segments. The length of an octilinear segment can be influenced by the maximum non-orthogonal segment ratio and the preferred polyline segment length. The new octilinear segments maintain a minimum distance between the edges and all nodes in the graph if possible.
Default Values of Properties
maximumNonOrthogonalSegmentRatio | 0.5 | |
minimumNodeToEdgeDistance | 10 | |
preferredPolylineSegmentLength | 50 | |
scope | ROUTE_ALL_EDGES
| All edges are routed. |
Type Details
- yfiles module
- router-polyline
- yfiles-umd modules
- layout-area, layout-multipage, layout-orthogonal-compact, layout, router-bus, router-polyline
- Legacy UMD name
- yfiles.router.PolylineLayoutStage
See Also
Constructors
Creates a new instance of PolylineLayoutStage using the given core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- the core layout routine
- affectedNodesDpKey - Object
The IDataProvider key used for looking up the selected state of the nodes of the graph to be laid out. This option sets the affectedNodesDpKey property on the created object.
- affectedEdgesDpKey - Object
The IDataProvider key used for looking up the selected state of the edges of the graph to be laid out. This option sets the affectedEdgesDpKey property on the created object.
- scope - EdgeRouterScope
The (sub-)set of edges to be routed in a polyline fashion. This option sets the scope property on the created object.
- minimumNodeToEdgeDistance - number
The minimum distance between edges and node bounds. This option sets the minimumNodeToEdgeDistance property on the created object.
- maximumNonOrthogonalSegmentRatio - number
The maximum segment length ratio at each end of an orthogonal segment that may get converted into a (non-orthogonal) polyline segment. This option sets the maximumNonOrthogonalSegmentRatio property on the created object.
- preferredPolylineSegmentLength - number
The preferred segment length for (non-orthogonal) polyline segments. This option sets the preferredPolylineSegmentLength property on the created object.
Properties
Gets or sets the IDataProvider key used for looking up the selected state of the edges of the graph to be laid out.
Remarks
Default Value
AFFECTED_EDGES_DP_KEY.Throws
- Exception({ name: 'ArgumentError' })
- if the specified key is
null
See Also
Gets or sets the IDataProvider key used for looking up the selected state of the nodes of the graph to be laid out.
Remarks
Default Value
AFFECTED_NODES_DP_KEY.Throws
- Exception({ name: 'ArgumentError' })
- if the specified key is
null
See Also
Gets or sets the core layout algorithm that is wrapped by this stage.
Gets or sets the maximum segment length ratio at each end of an orthogonal segment that may get converted into a (non-orthogonal) polyline segment.
Remarks
0
and 0.5
.Default Value
0.5
.Throws
- Exception({ name: 'ArgumentError' })
- if the ratio does not lie within
[0,0.5]
interval
Gets or sets the minimum distance between edges and node bounds.
Remarks
0
.Default Value
10
.Throws
- Exception({ name: 'ArgumentError' })
- if the distance is negative
Gets or sets the preferred segment length for (non-orthogonal) polyline segments.
Remarks
0
.Default Value
50
.Throws
- Exception({ name: 'ArgumentError' })
- if the length is negative
Gets or sets the (sub-)set of edges to be routed in a polyline fashion.
Remarks
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if the given argument is none of the predefined scope values
See Also
Methods
Adds polyline segments to the edge routes produced by the core layout algorithm.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Implements
Invokes the layout process of the core layout algorithm.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph