- I
- I
Remarks
Layout Style
The edges connect to their ports with straight lines. This may lead to edges crossing nodes.
Concept
StraightLineEdgeRouter will first invoke the coreLayout if one exists. Then, it will remove all bends from the edges and will place the ports either in the center of the nodes or at a location specified by EdgePortCandidates and NodePortCandidates. Port groups are handled as a postprocessing step by the portPlacementStage.
Default Values of Properties
| Name | Default |
|---|---|
| coreLayout | null |
See Also
Developer's Guide
Members
Constructors
Creates a new instance of StraightLineEdgeRouter with an 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 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 a LayoutStageBase that provides support for EdgePortCandidates, NodePortCandidates or port groups.
To specify EdgePortCandidates, NodePortCandidates, or port group IDs, use the corresponding properties in the BasicPortData<TNode, TEdge, TNodeLabel, TEdgeLabel> accessed via ports.
This LayoutStageBase is enabled by default, and its routeCorrectionPolicy is set to MOVE_PORTS.
See Also
API
- ports
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.applyLayoutRoutes the edges as straight lines from their source to their target after invoking the coreLayout.
createLayoutData
(graph: LayoutGraph): StraightLineEdgeRouterData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the StraightLineEdgeRouter.
createLayoutData
(graph: LayoutGraph): StraightLineEdgeRouterData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>Parameters
- graph: LayoutGraph
- the graph that determines the generic type arguments of the created layout data
Return Value
- StraightLineEdgeRouterData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>
- an instance of layout data that can be used to perform item-specific configurations for the given StraightLineEdgeRouter.
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the StraightLineEdgeRouter.
LayoutExecutor type is available at runtime.Parameters
- graph?: IGraph
- the graph that determines the generic type arguments of the created layout data
Return Value
- StraightLineEdgeRouterData<INode, IEdge, ILabel, ILabel>
- an instance of layout data that can be used to perform item-specific configurations for the given StraightLineEdgeRouter.