- I
- I
Remarks
This layout stage provides a generic way to add curved edge paths for a layout with polyline routes. It first calls the coreLayout and converts the edge routes as a post-processing step. Note that HierarchicalLayout and EdgeRouter offer an integrated curve routing, making the usage of this layout stage unnecessary (see routing styles CURVED and CURVED).
Using the scope, it is possible to select for which edges the path is converted to a curved one. This allows to only change a subset of edges. Furthermore, the CurveRoutingEdgeDescriptor class allows to individually configure settings for edges.
This stage is able to consider node and edge labels, see the respective properties nodeLabelPlacement and edgeLabelPlacement. If edge labels are considered, the EdgeLabelPreferredPlacement is respected too, such that the preferred placement remains correct if it is already correct after the core layout execution.
This stage also supports edge grouping such that edges that are correctly grouped by the core layout algorithm remain grouped in the curved layout result. However, it will not create new groupings. The same applies for other features like, e.g., LayoutPortCandidates. They are only respected if they are already respected by the coreLayout.
Default Values of Properties
| Name | Default | Description |
|---|---|---|
| coreLayout | null | |
| defaultEdgeDescriptor | CurveRoutingEdgeDescriptor | |
| edgeLabelPlacement | BasicEdgeLabelPlacement.CONSIDER | Edge labels are considered |
| nodeLabelPlacement | BasicNodeLabelPlacement.CONSIDER | Node labels are considered. |
See Also
Developer's Guide
Members
Constructors
Creates a new CurveRoutingStage instance using the given optional coreLayout.
Parameters
- coreLayout?: ILayoutAlgorithm
- The core layout algorithm
Properties
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Property Value
Default Value
Defined in
LayoutStageBase.coreLayoutGets or sets the default CurveRoutingEdgeDescriptor which provides settings that are considered when adding curves to the edge path for edges that have no individual descriptor assigned.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified CurveRoutingEdgeDescriptor is
null
Default Value
See Also
Gets or sets whether or not edge labels are considered when determining curved edge routes.
Property Value
Default Value
See Also
Gets or sets a value that determines whether this stage should do anything but execute the coreLayout.
By default, when constructed, stages should be enabled. Users may disable a stage's functionality by setting this property to false.
Stages that can guarantee that the graph will not change can choose to not even execute the coreLayout when disabled.
Defined in
LayoutStageBase.enabledGets or sets whether or not node labels are considered by the layout stage.
Property Value
Default Value
Methods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Parameters
- graph: LayoutGraph
- The graph to apply the layout to.
Defined in
LayoutStageBase.applyLayoutAdds curved segments to the edge routes produced by the coreLayout.
createLayoutData
(graph: LayoutGraph): EdgeScopeData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel, boolean>Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to define the edges affected by the CurveRoutingStage.
createLayoutData
(graph: LayoutGraph): EdgeScopeData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel, boolean>Parameters
- graph: LayoutGraph
- the graph that determines the generic type arguments of the created layout data
Return Value
- EdgeScopeData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel, boolean>
- an instance of layout data that can be used to perform item-specific configurations for the given CurveRoutingStage.
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to define the edges affected by the CurveRoutingStage.
LayoutExecutor type is available at runtime.Parameters
- graph: IGraph
- the graph that determines the generic type arguments of the created layout data
Return Value
- EdgeScopeData<INode, IEdge, ILabel, ILabel, boolean>
- an instance of layout data that can be used to perform item-specific configurations for the given CurveRoutingStage.