Specifies custom data for the SeriesParallelLayout.
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.seriesparallel.SeriesParallelLayoutData
See Also
Constructors
Creates a new instance of SeriesParallelLayoutData which helps configuring SeriesParallelLayout.
Parameters
A map of options to pass to the method.
- edgeLayoutDescriptors - ItemMapping<IEdge,SeriesParallelLayoutEdgeLayoutDescriptor>
The mapping from edges to their SeriesParallelLayoutEdgeLayoutDescriptor. This option sets the edgeLayoutDescriptors property on the created object.
- portAssignments - ItemMapping<INode,ISeriesParallelLayoutPortAssignment>
The mapping from nodes to their ISeriesParallelLayoutPortAssignment. This option sets the portAssignments property on the created object.
- outEdgeComparers - ItemMapping<INode,system.Comparison<IEdge>>
The mapping from nodes to comparison functions used to sort the nodes' outgoing edges. This option sets the outEdgeComparers property on the created object.
- sourceGroupIds - ItemMapping<IEdge,Object>
A mapping from edges to an object representing their source edge group. This option sets the sourceGroupIds property on the created object.
- targetGroupIds - ItemMapping<IEdge,Object>
A mapping from edges to an object representing their target edge group. This option sets the targetGroupIds property on the created object.
- abortHandler - AbortHandler
The AbortHandler used during the layout. This option sets the abortHandler property on the created object.
- edgeLabelPreferredPlacement - ItemMapping<ILabel,PreferredPlacementDescriptor>
The mapping that provides a PreferredPlacementDescriptor instance for edge ILabels. This option sets the edgeLabelPreferredPlacement 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 mapping that provides a PreferredPlacementDescriptor instance for edge ILabels.
Examples
Depending on how much customization is needed, some ways of setting PreferredPlacementDescriptors are more convenient than others. For example, to set the same descriptor for all labels, you can just use the constant property:
If some labels should use custom placement or this has to be configured ahead of time, you can use the mapper instead:
When the preferred placement can be inferred from the label itself, a delegate is usually the easiest choice:
Note that the preferred placement can also be inferred from an arbitrary ILabelModelParameter:
See Also
Gets or sets the mapping from edges to their SeriesParallelLayoutEdgeLayoutDescriptor.
Gets or sets the mapping from nodes to comparison functions used to sort the nodes' outgoing edges.
Remarks
null
, the outgoing edges maintain their initial order.See Also
Gets or sets the mapping from nodes to their ISeriesParallelLayoutPortAssignment.
Remarks
See Also
Gets or sets a mapping from edges to an object representing their source edge group.
Remarks
See Also
Gets or sets a mapping from edges to an object representing their target edge group.
Remarks
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.