documentationfor yFiles for HTML 2.6

OrthogonalLayoutData

Specifies custom data for the OrthogonalLayout.

Inheritance Hierarchy
LayoutData
OrthogonalLayoutData

Examples

The following example shows how to create a new instance of OrthogonalLayoutData and use it with an OrthogonalLayout:

Creating an instance of OrthogonalLayoutData
const layoutData = new OrthogonalLayoutData()
layoutData.sourceGroupIds = (edge) => edge.sourceNode
layoutData.directedEdges = graphComponent.selection.selectedEdges
graphComponent.graph.applyLayout(new OrthogonalLayout(), layoutData)const layoutData = new OrthogonalLayoutData()
layoutData.sourceGroupIds = (edge: IEdge) => edge.sourceNode
layoutData.directedEdges = graphComponent.selection.selectedEdges
graphComponent.graph.applyLayout(new OrthogonalLayout(), layoutData)

In many cases the complete initialization of OrthogonalLayoutData can also be done in a single object initializer:

Using an object initializer for easy creation of OrthogonalLayoutData
const layoutData = new OrthogonalLayoutData({
  sourceGroupIds: (edge) => edge.sourceNode,
  directedEdges: graphComponent.selection.selectedEdges
})

graphComponent.graph.applyLayout(new OrthogonalLayout(), layoutData)const layoutData = new OrthogonalLayoutData({
  sourceGroupIds: (edge: IEdge): any => edge.sourceNode,
  directedEdges: graphComponent.selection.selectedEdges
})

graphComponent.graph.applyLayout(new OrthogonalLayout(), layoutData)

Type Details

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

See Also

Constructors

Properties

Methods