This edge routing algorithm routes edges as straight-lines considering the specified PortConstraints.
Remarks
Layout Style
The edges connect to their ports with straight-lines. This may lead to edges crossing nodes.
Concept
StraightLineEdgeRouter will first invoke the coreLayout if one exists. Then, it will remove all bends from the edges and will place the ports either on the center of the nodes or at a location specified by a PortConstraint.
Default Values of Properties
coreLayout | null | |
scope | ROUTE_ALL_EDGES
|
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.router.StraightLineEdgeRouter
Constructors
Creates a new instance of StraightLineEdgeRouter with an optional core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- The core layout algorithm.
- scope - EdgeRouterScope
The (sub-)set of edges to be routed. This option sets the scope property on the created object.
- affectedNodesDpKey - Object
The key to register a IDataProvider that provides the selected state of the nodes of the graph. This option sets the affectedNodesDpKey property on the created object.
- affectedEdgesDpKey - Object
The key to register a IDataProvider that provides the selected state of the edges of the graph. This option sets the affectedEdgesDpKey property on the created object.
Properties
Gets or sets the key to register a IDataProvider that provides the selected state of the edges of the graph.
Remarks
Default Value
AFFECTED_EDGES_DP_KEY.Throws
- Exception({ name: 'ArgumentError' })
- if the specified key is
null
See Also
Gets or sets the key to register a IDataProvider that provides the selected state of the nodes of the graph.
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 (sub-)set of edges to be routed.
Remarks
Default Value
ROUTE_ALL_EDGES.Throws
- Exception({ name: 'ArgumentError' })
- if the given argument is an unknown specifier
See Also
Methods
Routes the edges as straight-lines from their source to their target after invoking 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