A EdgeRouterBusDescriptor defines settings for edges routed on a common bus by EdgeRouter.
Remarks
Edges mapped to the same EdgeRouterBusDescriptor instance form a bus. The mapping is retrieved from a IDataProvider registered with the input graph with key BUS_DESCRIPTOR_DP_KEY. A bus consists of a set of backbone segments shared by multiple edges to which shorter segments that connect to the actual nodes are attached. This descriptor allows to specify settings about the bus, for example, the location of the bus may be user-specified - see busPoints.
With buses, the routing algorithm tries to produce routes where the edges share as much of their paths as possible. It yields long line segments (so-called backbone segments) where ideally all but the first and last segments of all edge paths are drawn on top of each other (forming the bus), with short connections branching off to the nodes (bus connections).
Edges that are fixed (i.e. are not marked for routing) may also belong to a bus. Then, the bus segments will be derived using the existing path of the fixed edges. This way, buses can be incrementally updated, e.g., when a new edge should be added to an existing bus structure. Carefully note that fixed edges must have a correct orthogonal path for this feature to work properly.
Default Values of Properties
automaticEdgeGrouping | true | Edges ending at the same node are automatically grouped. |
busPoints | null | The algorithm automatically detects a suitable bus. |
minimumBackboneSegmentLength | 100.0 | |
multipleBackboneSegments | true | The algorithm may create buses that consist of multiple backbone segments. |
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.EdgeRouterBusDescriptor
See Also
Constructors
Creates a new instance of a EdgeRouterBusDescriptor with the default values.
Parameters
A map of options to pass to the method.
- busPoints - YPointPath
The user-specified bus path that represents the backbone for edges associated with this bus. This option sets the busPoints property on the created object.
- minimumBackboneSegmentLength - number
The preferred minimum length of backbone segments. This option sets the minimumBackboneSegmentLength property on the created object.
- multipleBackboneSegments - boolean
Whether or not the algorithm may create buses that consist of multiple backbone segments. This option sets the multipleBackboneSegments property on the created object.
- automaticEdgeGrouping - boolean
Whether or not bus edges ending at the same node are automatically grouped such that they share a common bus connection. This option sets the automaticEdgeGrouping property on the created object.
Properties
Gets or sets whether or not bus edges ending at the same node are automatically grouped such that they share a common bus connection.
Remarks
- All edges share the same bus connections. Simply enable this property and define no other edge groupings.
- Each edge is routed individually between the bus and the end node. Disable this property and define no other edge groupings.
- A mixture of the first two scenarios. Define the desired edge groupings and they will be considered. For edges that have no grouping information, the value of this property is considered. This way multiple edges may share a bus connections while others use their individual routes.
Default Value
true
.Edges ending at the same node are automatically grouped.
See Also
Sample Graphs
Gets or sets the user-specified bus path that represents the backbone for edges associated with this bus.
Remarks
Default Value
null
.The algorithm automatically detects a suitable bus.
Gets the point path that describes the bus computed by the EdgeRouter.
Remarks
See Also
Gets or sets the preferred minimum length of backbone segments.
Remarks
This number defines the minimum length of backbone segments which are computed during the selection of backbone segments. Final backbone segments might actually be shorter because not the full segment is used by bus connections; such dead-ends are not drawn.
The minimum length is defined to be a value greater than or equal to 1.0
.
Default Value
100.0
.Throws
- Exception({ name: 'ArgumentError' })
- if the given minimum length is smaller than
1.0
Sample Graphs
Gets or sets whether or not the algorithm may create buses that consist of multiple backbone segments.
Remarks
Default Value
true
.The algorithm may create buses that consist of multiple backbone segments.