documentationfor yFiles for HTML 2.6

CopiedLayoutGraph

A CopiedLayoutGraph is a LayoutGraph that serves as a copy of another graph with layout information.

Inheritance Hierarchy
Graph
LayoutGraph
CopiedLayoutGraph

Remarks

A CopiedLayoutGraph comes to use if a layout algorithm should not run directly on the original graph. Using a copy, the calculated layout will not be applied to the original graph before the layout algorithm finished successfully. This can prevent inconsistencies in case something goes wrong during layout calculations.

Concept

CopiedLayoutGraph contains corresponding nodes and edges for each node and edge in the original graph and copies the labels of the original nodes and edges. It also delegates all IDataProviders registered with the original graph.

To preserve the relations between the original elements and the copied elements in this graph, CopiedLayoutGraph updates mappings between those elements.

If there are structural changes to the original graph, they can be transferred to this copied graph using syncStructure. Then the copied graph will be altered, adding and removing elements, until it corresponds to the original again.

Method commitLayoutToOriginalGraph will transfer updated layout information to the original graph. The original graph will stay unchanged until this method is called.

Type Details

yfiles module
layout-core
yfiles-umd modules
All layout modules, view-layout-bridge
Legacy UMD name
yfiles.layout.CopiedLayoutGraph

See Also

Constructors

Properties

Methods