Specifies custom data for the ParallelEdgeRouter.
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.router.ParallelEdgeRouterData
Constructors
Creates a new instance of ParallelEdgeRouterData which helps configuring ParallelEdgeRouter.
Parameters
A map of options to pass to the method.
- affectedEdges - ItemCollection<IEdge>
The collection of edges affected by this router. This option sets the affectedEdges property on the created object.
- leadingEdges - ItemCollection<IEdge>
The collection of leading edges. This option sets the leadingEdges property on the created object.
- abortHandler - AbortHandler
The AbortHandler used during the layout. This option sets the abortHandler property on the created object.
- routedParallelEdges - ICollection<IEdge>
The edge collection that after the layout run will contain all parallel edges that were routed and not treated as leading edges. This option sets the routedParallelEdges property on the created object.
Properties
Gets or sets the AbortHandler used during the layout.
Remarks
An AbortHandler can be used to gracefully stop or cancel a running layout and offers options for automatically doing so after a predetermined time.
An AbortHandler configured or set here overrides the one on LayoutExecutor.
Examples
The most common use case would be to just configure the AbortHandler here, e.g. to set timeouts for a graceful stop or canceling the running layout:
layoutData.abortHandler.stopDuration = TimeSpan.fromSeconds(10) layoutData.abortHandler.cancelDuration = TimeSpan.fromSeconds(30)
layoutData.abortHandler!.stopDuration = TimeSpan.fromSeconds(10) layoutData.abortHandler!.cancelDuration = TimeSpan.fromSeconds(30)
If there's already an AbortHandler instance that's pre-configured or will be used in a different place to, e.g., cancel the layout when the user presses a button, you can also set one explicitly:
layoutData.abortHandler = abortHandler
See Also
Gets or sets the collection of edges affected by this router.
Gets or sets the collection of leading edges.
Remarks
A leading edge is the edge whose layout is used to obtain the layout of the corresponding parallel edges.
If no leading edge is specified for a bundle of parallel edges, it will be determined automatically. If there is more than one leading edge, the first one is chosen.
See Also
Gets or sets the edge collection that after the layout run will contain all parallel edges that were routed and not treated as leading edges.
Remarks
The set of routed parallel edges corresponds to the edges that were hidden during the coreLayout of the ParallelEdgeRouter.
Knowing which parallel edges were identified and hidden during the core layout can be a valuable information for use cases where it is required to handle such edges specifically. A frequent scenario is, for example, the requirement to place edge labels of these edges. The core layout is not able to do so, because parallel edges are hidden. A generic labeling algorithm where only the labels of the parallel edges are affected and placed can now easily be applied (see GenericLabeling)
If the router runs as part of the pipeline in the MultiStageLayout, stages like the labeling, which run after the router can already use the information. This way, for example, the labeling stage can handle labels of non-leading, parallel edges in a specific way.
See Also
Methods
Combines this instance with the given layout data.
Remarks
Parameters
A map of options to pass to the method.
- data - LayoutData
- The LayoutData to combine this instance with.
Returns
- ↪LayoutData
- The combined layout data.