- I
- I
Remarks
Concept
Replacing the bends works in three steps:
- Replacing the bends and the edge segments between them with proxy nodes and edges
- Invoking the coreLayout on the altered graph
- Recreating the bends and removing all inserted proxy elements
When the temporary proxy elements have been inserted, edge information about port candidates, edge groups and selection state can be adopted from the original edges. That way, the coreLayout can access the mentioned information.
Default Values of Properties
| Name | Default | Description |
|---|---|---|
| adoptAffectedEdges | true | The selection state of the original edge is applied to all corresponding proxy edges. |
| adoptEdgeGroups | true | Original edge grouping information is applied to the proxy edges. |
| adoptPortCandidates | true | LayoutPortCandidates of the original edges are applied to the proxy edges. |
| coreLayout | null |
Members
Constructors
Creates a new BendSubstitutionStage instance with the given size as the width and height for the inserted proxy nodes.
Parameters
- size?: number
- the size for the proxy nodes
- coreLayout?: ILayoutAlgorithm
- the core layout algorithm
Throws
- Exception ({ name: 'ArgumentError' })
- if the given size is negative
Properties
Property Value
true if inserted proxy edges get the selection state of their corresponding original edge, false otherwiseDefault Value
See Also
Property Value
true if inserted proxy edges get the edge grouping information from their corresponding originals, false otherwiseDefault Value
See Also
Gets or sets whether or not the associated LayoutPortCandidates of the original edge should be adopted by its replacement edges.
Property Value
true if inserted proxy edges get the LayoutPortCandidates of their corresponding originals, false otherwiseDefault Value
See Also
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Property Value
Default Value
Defined in
LayoutStageBase.coreLayoutGets 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 the selection state of edges specified with the AFFECTED_EDGES_DATA_KEY should be set as the active routing scope during the execution of the coreLayout.
Default Value
See Also
Methods
Adds information to newly created proxy nodes.
This is a callback method that will be invoked after new elements for the given edge have been added to the given graph by prepare. At this point, the original edge is still in the graph.
The current implementation does nothing.
Parameters
- graph: LayoutGraph
- the input graph
- edge: LayoutEdge
- the edge whose bends were replaced by the given proxy nodes
- proxyNodes: YList<LayoutNode>
- the proxy nodes representing the bends of the edge
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.applyLayoutReplaces all bends in the current scope with temporary proxy nodes before invoking the coreLayout.
Parameters
- graph: LayoutGraph
- The input graph
Overrides
LayoutStageBase.applyLayoutImplcreateLayoutData
(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 BendSubstitutionStage.
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 BendSubstitutionStage.
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to define the edges affected by the BendSubstitutionStage.
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 BendSubstitutionStage.
Prepares the graph before calling the coreLayout.
The bends of the edges belonging to the current scope are replaced by proxy nodes and the segments between those new nodes are replaced by proxy edges.
Edge-specific information like LayoutPortCandidates, edge groups or selection state can be applied to the proxy edges to keep this information for the coreLayout.
This method is called by applyLayoutImpl before invoking the coreLayout. It may be overridden to extend the edge-specific information that should be adopted by the inserted proxy edges.
Parameters
- graph: LayoutGraph
- the input graph
See Also
Restores the structure of the graph after the coreLayout has finished.
Parameters
- graph: LayoutGraph
- the graph arranged by the coreLayout