Specifies custom data for the OrthogonalPatternEdgeRouter.
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.router.OrthogonalPatternEdgeRouterData
See Also
Constructors
Creates a new instance of OrthogonalPatternEdgeRouterData which helps configuring OrthogonalPatternEdgeRouter.
Parameters
A map of options to pass to the method.
- affectedEdges - DpKeyItemCollection<IEdge>
The collection of edges affected by this router. This option sets the affectedEdges property on the created object.
- sourcePortConstraints - ItemMapping<IEdge,PortConstraint>
A mapping from edges to their source PortConstraint. This option sets the sourcePortConstraints property on the created object.
- targetPortConstraints - ItemMapping<IEdge,PortConstraint>
A mapping from edges to their target PortConstraint. This option sets the targetPortConstraints property on the created object.
- sourcePortCandidates - ItemMapping<IEdge,ICollection<PortCandidate>>
A mapping from edges to a collection of their source port candidates. This option sets the sourcePortCandidates property on the created object.
- targetPortCandidates - ItemMapping<IEdge,ICollection<PortCandidate>>
A mapping from edges to a collection of their target port candidates. This option sets the targetPortCandidates property on the created object.
- nodePortCandidateSets - ItemMapping<INode,PortCandidateSet>
A mapping from nodes to their PortCandidateSet. This option sets the nodePortCandidateSets property on the created object.
- abortHandler - AbortHandler
The AbortHandler used during the layout. This option sets the abortHandler 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 a mapping from nodes to their PortCandidateSet.
Examples
The simplest way to define node port candidate sets is to use the same PortCandidateSet for all nodes, if suitable for the use case:
The same effect can be achieved with a delegate as well, however, a more useful way to use a delegate would be to decide whether a node should get a port candidate set based on some data at the node, e.g., found in its tag:
If specific nodes should get a certain PortCandidateSet, it may sometimes be easier to use the mapper to set them:
See Also
Gets or sets a mapping from edges to a collection of their source port candidates.
Gets or sets a mapping from edges to their source PortConstraint.
Gets or sets a mapping from edges to a collection of their target port candidates.
Gets or sets a mapping from edges to their target PortConstraint.
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.