Worker that lays out the graph.
What to lay out and how.
Optionalhandlers: { onProgress?: (percent: number) => void; signal?: AbortSignal }
Optional progress and cancellation.
OptionalonProgress?: (percent: number) => voidReceives the whole percentage each time it changes.
Optionalsignal?: AbortSignalRejects the call with the signal's reason when aborted.
The laid-out graph as JSON.
Lay out a graph in a worker answering with forceGraphHandleLayoutMessages, such as the one
forceGraphCreateLayoutWorker starts, so the page stays responsive. Requests to the same worker run one after
another. Aborting rejects at once and ignores the worker's late answer; terminate the worker to stop its work too.
Worker that lays out the graph.
Optionaloptions: ForceGraphLayoutWorkerOptions<What to lay out and how.
Optionalhandlers: { onProgress?: (percent: number) => void; signal?: AbortSignal }
Optional progress and cancellation.
OptionalonProgress?: (percent: number) => voidReceives the whole percentage each time it changes.
Optionalsignal?: AbortSignalRejects the call with the signal's reason when aborted.
The laid-out graph as JSON.
Lay out a graph in a worker answering with forceGraphHandleLayoutMessages, such as the one
forceGraphCreateLayoutWorkerstarts, so the page stays responsive. Requests to the same worker run one after another. Aborting rejects at once and ignores the worker's late answer; terminate the worker to stop its work too.