Specifies custom data for the TemporaryGroupNodeInsertionStage.
Remarks
Examples
// 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
Creates a new instance of TemporaryGroupNodeInsertionData which helps configuring TemporaryGroupNodeInsertionStage.
Parameters
A map of options to pass to the method.
- temporaryGroups - ItemCollectionMapping<INode,TemporaryGroupDescriptor>
The mapping from nodes to a TemporaryGroupDescriptor so that nodes with the same descriptor will be assigned to the same temporarily inserted group node. This option sets the temporaryGroups property on the created object.
Properties
Gets or sets the mapping from nodes to a TemporaryGroupDescriptor so that nodes with the same descriptor will be assigned to the same temporarily inserted group node.
Remarks
The stage converts the given TemporaryGroupDescriptors into a valid, temporary grouping structure that is visible for the core layout algorithm and is obeyed by it if it supports grouped graphs.
To define nested temporary groups, the descriptor can contain a parent descriptor. Optionally, it can contain the recursiveGroupLayoutAlgorithm that should be applied for the temporary group if the stages is used with the RecursiveGroupLayout as its core layout.
Examples
A single temporary group for specific known elements can be defined as follows:
The following snippet shows how to define a temporary group with default settings and no recursive layout algorithm for all nodes that share a common criteria:
Nested temporary groups are defined via the parent property:
See Also
Methods
Combines this instance with the given layout data.
Remarks
Parameters
A map of options to pass to the method.
- data - LayoutData
- The LayoutData to combine this instance with.
Returns
- ↪LayoutData
- The combined layout data.