GivenCoordinatesLayout changes node locations and sizes as well as edge paths to user-specified values before invoking the coreLayout.
Remarks
Use nodeLocations to specify the locations (top-left coordinates) of nodes, nodeSizes to specify the size of nodes, and edgePaths 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.
Type Details
- yFiles module
- algorithms
See Also
Constructors
Creates a new GivenCoordinatesLayout instance using the given coreLayout.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- the core layout algorithm
- enabled - boolean
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.
Remarks
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.
Implements
Methods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- The graph to apply the layout to.
Implements
Changes node locations and edge paths to user-specified values and then invokes the core layout algorithm.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
Implements
createLayoutData
(graph: LayoutGraph) : GivenCoordinatesLayoutData<LayoutNode,LayoutEdge,LayoutNodeLabel,LayoutEdgeLabel>Returns an instance of LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel> that can be used to perform item-specific configurations for the GivenCoordinatesLayout.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the graph that determines the generic type arguments of the created layout data
Returns
- ↪GivenCoordinatesLayoutData<LayoutNode,LayoutEdge,LayoutNodeLabel,LayoutEdgeLabel>
- an instance of layout data that can be used to perform item-specific configurations for the given GivenCoordinatesLayout.
Returns an instance of LayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel> that can be used to perform item-specific configurations for the GivenCoordinatesLayout.
Remarks
Parameters
A map of options to pass to the method.
- graph - IGraph
- the graph that determines the generic type arguments of the created layout data
Returns
- ↪GivenCoordinatesLayoutData<INode,IEdge,ILabel,ILabel>
- an instance of layout data that can be used to perform item-specific configurations for the given GivenCoordinatesLayout.
LayoutExecutor
type is available at runtime.Constants
A data key for specifying the initial path of edges.
Remarks
Each edge can be mapped to an array of Point. Before calling the coreLayout, this stage sets the path of each edge to the associated array of Point. The path must contain the source port location, followed by the bends (if any), followed by the target port location.
If an empty path is specified, the current path will be reset: all bends are cleared and the current source/target port locations are kept. The path of edges without associated value isn't changed by this stage (but may be changed by the core layout algorithm).
See Also
A data key for specifying the initial location of nodes.
Remarks
See Also
A data key for specifying the size of nodes.