LayoutSupport

Contains helper functions to transfer node and edge data to a layout graph and back.

Props

NameDescriptionType
buildGraph
Creates a graph from the given data that can be arranged by a yFiles layout algorithm.
(
nodes: Node[],
edges: Edge[],
zoom: number
) => IGraph
reactFlowRef?
An optional reference to the React Flow element. This reference is particularly useful in scenarios where there are multiple React Flow elements on the same page or when the flow is encapsulated within a closed shadow DOM.
RefObject<HTMLElement>
transferLayout
Transfers the calculated layout from the graph to lists of nodes and edges.
(
graph: IGraph
) => {
arrangedNodes: Node[]
arrangedEdges: Edge[]
}