Function: blockingDefaultLayout()
blockingDefaultLayout(
graph
,state
,options
?):Promise
<LayoutState
>
Default (fallback) diagram layout function.
The algorithm used is force-directed layout from cola.js.
Warning: this function is computationally expensive and should be used only as fallback when other ways to compute diagram layout is not available as the browser execution will freeze during the call for large diagrams.
The recommended way is to use web workers via
defineLayoutWorker Reactodia.defineLayoutWorker() to import the worker from
@reactodia/workspace/layout.worker
and useWorker Reactodia.useWorker() to
get a layout function from it.
Parameters
Parameter | Type |
---|---|
| |
| |
|
Returns
Promise
<LayoutState
>