documentationfor yFiles for HTML 2.6

TemporaryGroupNodeInsertionData

Specifies custom data for the TemporaryGroupNodeInsertionStage.

Inheritance Hierarchy
LayoutData
TemporaryGroupNodeInsertionData

Remarks

The TemporaryGroupNodeInsertionStage can be used for ungrouped graphs if nodes should be treated by layout algorithms as if they were actually grouped.

Examples

Using a RecursiveGroupLayout together with a TemporaryGroupNodeInsertionStage
// define temporaryGroup1 to use an OrganicLayout
// with all nodes in nodeList belonging to temporaryGroup1
const groupNodeInsertionData = new TemporaryGroupNodeInsertionData()
const temporaryGroup1 = groupNodeInsertionData.temporaryGroups.add(
  new TemporaryGroupDescriptor({
    recursiveGroupLayoutAlgorithm: new OrganicLayout()
  })
)
temporaryGroup1.items = nodeList
// wrap the core layout in a RecursiveGroupLayout and both in a TemporaryGroupNodeInsertionStage
const layout = new TemporaryGroupNodeInsertionStage(
  new RecursiveGroupLayout(hierarchicLayout)
)
// combine the HierarchicLayoutData and the TemporaryGroupNodeInsertionData
const layoutData = new CompositeLayoutData(
  hierarchicLayoutData,
  groupNodeInsertionData
)
// run the layout
await graphComponent.morphLayout({ layout, layoutData, morphDuration: '1s' })
// do something after the Promise resolved

Type Details

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

Constructors

Properties

Methods