C

GivenCoordinatesLayout

GivenCoordinatesLayout changes node locations and sizes as well as edge paths to user-specified values before invoking the LayoutStageBase.coreLayout.

Remarks

Use GivenCoordinatesLayoutData.nodeLocations<TNode, TEdge, TNodeLabel, TEdgeLabel> to specify the locations (top-left coordinates) of nodes, GivenCoordinatesLayoutData.nodeSizes<TNode, TEdge, TNodeLabel, TEdgeLabel> to specify the size of nodes, and GivenCoordinatesLayoutData.edgePaths<TNode, TEdge, TNodeLabel, TEdgeLabel> to specify the path of edges (i.e. the port locations and the bends of edges).

A possible application for this stage is animated incremental layouts where the position of non-incremental elements should be changed/restored without affecting the start position of these elements in the animation. Therefore, this stage could also be used together with PlaceNodesAtBarycenterStage.

Default Values of Properties

NameDefault
coreLayoutnull

Members

Show:

Constructors

Creates a new GivenCoordinatesLayout instance using the given LayoutStageBase.coreLayout.

Parameters

coreLayout?: ILayoutAlgorithm | null
the core layout algorithm

Properties

Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
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.

final

Methods

Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
This implementation checks the enabled state and when it's not enabled, will delegate to the coreLayout, directly. When the stage is enabled, all the work will be delegated to applyLayoutImpl, instead.
final

Parameters

graph: LayoutGraph
The graph to apply the layout to.
Changes node locations and edge paths to user-specified values and then invokes the core layout algorithm.
protected

Parameters

graph: LayoutGraph
the input graph
Abstract method that performs the actual implementation when the stage is enabled
Subclasses don't need to check the enabled field, because applyLayout will only invoke this method on enabled instances. Implementations should call ILayoutAlgorithm.applyLayout of the coreLayout between pre- and postprocessing steps as appropriate for the stage. applyLayout only invokes the core algorithm when the stage is disabled.
protectedabstract

Parameters

Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the GivenCoordinatesLayout.
The generic type arguments of the created layout data depend on the provided type parameter for this method.
final

Type Parameters

T

Return Value

T extends IGraph ? GivenCoordinatesLayoutData<INode, IEdge, ILabel, ILabel> : GivenCoordinatesLayoutData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>
an instance of layout data that can be used to perform item-specific configurations for the given GivenCoordinatesLayout.

Constants

All constants are filtered. Go to Filters.