This edge routing algorithm generates orthogonal routes for the edges of the graph.
Remarks
Compared to the routing algorithm implemented by class EdgeRouter, this implementation is usually faster but supports less constraints and, by default, may produce node-edge overlaps.
Layout Style
Edges are routed in an orthogonal fashion, i.e., edge paths consist only of vertical and horizontal segments.
During the routing process, the positions of the nodes are considered to be fixed and the routing algorithm will not modify their locations or their sizes in any way.
The edge routing algorithm can be applied wherever it is required to route the edges as orthogonal segments, while keeping the positions of the nodes in the diagram fixed. Some potential applications include electric circuit design, floor planning, UML class diagrams/inheritance diagrams and navigation maps.
Concept
This edge routing algorithm combines two strategic steps of edge routing and executes them one after the other. The first strategy is called path finder strategy and will route the edges, potentially with edge overlaps. The second strategy will then split overlapping edge segments inside their channels and distribute them according to the specific distribution strategy.
The default path finding strategy is OrthogonalPatternEdgeRouter. The default edge distribution strategy is OrthogonalSegmentDistributionStage.
Features
This class itself has no special routing options except from specifying the path finding and edge distribution strategy. Most of the features like minimum element distances, grid spacing and path restrictions have to be set on the used instances for the two routing steps.
For incremental edge routing, IDataProvider key AFFECTED_EDGES_DP_KEY has to be registered with the graph to mark all edges that should be routed by the algorithm. The routes of the other edges remain unchanged. If there is no such key registered, the algorithm routes all edges.
Default Values of Properties
edgeDistributionStrategy | OrthogonalSegmentDistributionStage
| |
pathFinderStrategy | OrthogonalPatternEdgeRouter
| |
routingPolicy | ALWAYS
| The edges are routed, ignoring the existing sketch. |
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.ChannelEdgeRouter
See Also
Constructors
Creates a new ChannelEdgeRouter instance with default settings.
Parameters
A map of options to pass to the method.
- pathFinderStrategy - ILayoutAlgorithm
The strategy for the path finding step. This option sets the pathFinderStrategy property on the created object.
- edgeDistributionStrategy - ILayoutAlgorithm
The strategy for the edge distribution step. This option sets the edgeDistributionStrategy property on the created object.
- routingPolicy - RoutingPolicy
The routing policy indicating if the edges are unconditionally routed or if the existing routes determines whether a new path is necessary. This option sets the routingPolicy property on the created object.
- coreLayout - ILayoutAlgorithm
The core layout algorithm that is wrapped by this stage. This option sets the coreLayout property on the created object.
Properties
Gets or sets the core layout algorithm that is wrapped by this stage.
Gets or sets the strategy for the edge distribution step.
Remarks
Default Value
OrthogonalSegmentDistributionStage.See Also
Gets or sets the strategy for the path finding step.
Remarks
Default Value
OrthogonalPatternEdgeRouter.See Also
Gets or sets the routing policy indicating if the edges are unconditionally routed or if the existing routes determines whether a new path is necessary.
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown routing policy is given
See Also
Methods
Performs the orthogonal routing of the edges of the input graph.
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
Checks the sizes of the nodes to be non-zero.
Constants
A data provider key for marking the edges that should be routed.
Remarks
Domain | Edge | |
Values | boolean | true if an edge should be routed by the algorithm, false otherwise |