documentationfor yFiles for HTML 2.6

CompositeLayoutData

Combines several LayoutData instances.

Inheritance Hierarchy
LayoutData
CompositeLayoutData

Remarks

This is especially useful if several layouts are run at once, for example a general layout and a subsequent edge routing.

The LayoutData are applied in the order as they appear in the items collection. This may influence which property "wins" when there are multiple LayoutData that define the same mapping or collection, e.g. AbortHandler, or affected nodes. Generally those should only ever be set on one of the child LayoutData instances.

Examples

The following example shows how CompositeLayoutData can be used to combine multiple LayoutData instances:
// Create layout data to be combined first

// Wrap them into CompositeLayoutData
const layoutData = new CompositeLayoutData(
  fixNodeLayoutData,
  organicLayoutData,
  edgeRouterData
)

// Run the combined layout
const layout = new EdgeRouter(new FixNodeLayoutStage(new OrganicLayout()))
graphComponent.graph.applyLayout(layout, layoutData)

Type Details

yfiles module
view-layout-bridge
yfiles-umd modules
view-layout-bridge
Legacy UMD name
yfiles.layout.CompositeLayoutData

See Also

Constructors

Properties

Methods