CurveRoutingStage replaces polyline edge paths with curved segments using cubic bezier splines.
Remarks
This layout stage provides a generic way to add curved edge paths for a layout with polyline routes. It first calls the core layout algorithm and converts the edge routes as a post-processing step. Note that HierarchicLayout and EdgeRouter offer an integrated curve routing, making the usage of this layout stage unnecessary (see routing styles CURVED and CURVED).
Using the scope, it is possible to select for which edges the path is converted to a curved one. This allows to only change a subset of edges. Furthermore, the CurveEdgeLayoutDescriptor class allows to individually configure settings for edges.
This stage is able to consider node and edge labels, see the respective properties considerNodeLabels and considerEdgeLabels. If edge labels are considered, the PreferredPlacementDescriptor is respected too, such that the preferred placement remains correct if it is already correct after the core layout execution.
This stage also supports edge grouping such that edges that are correctly grouped by the core layout algorithm remain grouped in the curved layout result. However, it will not create new groupings. The same applies for other features like, e.g., PortConstraints or PortCandidates. They are only respected if they are already respected by the core layout algorithm.
Default Values of Properties
affectedEdgesDpKey | AFFECTED_EDGES_DP_KEY
| |
considerEdgeLabels | true | Edge labels are considered |
considerNodeLabels | true | Node labels are considered |
defaultEdgeLayoutDescriptor | CurveEdgeLayoutDescriptor
| |
scope | ROUTE_ALL_EDGES
|
Type Details
- yfiles module
- router-other
- yfiles-umd modules
- layout-familytree, layout-multipage, layout-orthogonal-compact, layout, router-bus, router-other
- Legacy UMD name
- yfiles.router.CurveRoutingStage
Constructors
Creates a new CurveRoutingStage instance using the given optional core layout algorithm.
Parameters
A map of options to pass to the method.
- core - ILayoutAlgorithm
- the core layout algorithm
Properties
Gets or sets the IDataProvider key to look up which edges are routed.
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 to look up the nodes whose incident edges are routed.
Remarks
Default Value
AFFECTED_NODES_DP_KEY.Throws
- Exception({ name: 'ArgumentError' })
- if the specified
key is null
See Also
Gets or sets whether or not edge labels are considered while determining curved edge routes.
Remarks
Default Value
true
.Edge labels are considered
See Also
Gets or sets whether or not node labels are considered while determining spline routes.
Remarks
Default Value
true
.Node labels are considered
Gets or sets the core layout algorithm that is wrapped by this stage.
Gets or sets the default CurveEdgeLayoutDescriptor which provides layout information that is considered when adding curves to the edge path.
Remarks
Default Value
CurveEdgeLayoutDescriptor.Throws
- Exception({ name: 'ArgumentError' })
- if the specified
is null
See Also
Gets or sets the (sub-)set of edges whose routes shall be converted to curved ones.
Remarks
Default Value
ROUTE_ALL_EDGES.Throws
- Exception({ name: 'ArgumentError' })
- if the given scope is unknown
See Also
Methods
Adds curved 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
See Also
Defined in
Constants
A data provider key for specifying individual edge layout information.
Remarks
Domain | Edge | |
Values | CurveEdgeLayoutDescriptor | an edge layout descriptor that provides routing information for an edge or null if the default descriptor should be used |