rune-langium / visual-editor/src / computeLayoutAsync
Function: computeLayoutAsync()
ts
function computeLayoutAsync(
nodes,
edges,
options?): Promise<TypeGraphNode[] | null>;Defined in: packages/visual-editor/src/layout/layout-worker.ts:126
Compute layout asynchronously.
Prefers a Web Worker for true off-main-thread execution. Falls back to requestIdleCallback-based yielding on the main thread.
Returns null if a newer layout request superseded this one.
Parameters
| Parameter | Type |
|---|---|
nodes | TypeGraphNode[] |
edges | TypeGraphEdge[] |
options? | LayoutOptions |
Returns
Promise<TypeGraphNode[] | null>