Specifies custom data for the PartialLayout.
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.partial.PartialLayoutData
See Also
Constructors
Creates a new instance of PartialLayoutData which helps configuring PartialLayout.
Parameters
A map of options to pass to the method.
- affectedNodes - ItemCollection<INode>
The collection of nodes placed by the layout. This option sets the affectedNodes property on the created object.
- affectedEdges - ItemCollection<IEdge>
The collection of edges placed by the layout. This option sets the affectedEdges property on the created object.
- directedEdges - ItemCollection<IEdge>
The collection of edges that are considered as directed by the layout. This option sets the directedEdges property on the created object.
- componentIds - ItemMapping<INode,Object>
The mapping from partial nodes to an object defining their component assignment. This option sets the componentIds property on the created object.
- nodeHalos - ItemMapping<INode,NodeHalo>
- 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.
- abortHandler - AbortHandler
The AbortHandler used during the layout. This option sets the abortHandler property on the created object.
- partitionGridData - PartitionGridData
The partition grid layout data. This option sets the partitionGridData 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 placed by the layout.
Gets or sets the collection of nodes placed by the layout.
Gets or sets the mapping from partial nodes to an object defining their component assignment.
Remarks
See Also
Gets or sets the collection of edges that are considered as directed by the layout.
Gets or sets the mapping from nodes to their NodeHalo.
Remarks
Examples
The easiest option is to reserve the same space around all nodes, by setting a constant NodeHalo:
Handling only certain nodes differently can be done easily by using the mapper property:
In cases where the NodeHalo for each node can be determined by looking at the node itself it's often easier to just set a delegate instead of preparing a mapper:
See Also
Gets or sets the partition grid layout data.
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.