Skip to content

Interface: LayoutRunOptions ​

Options of one layoutInWorker call.

Properties ​

PropertyModifierTypeDescription
bundle?readonlyBundleOptionsBundle the links once the nodes are placed: the result's routes are the bundled ones.
move?readonlybooleanGive the graph's arrays to the worker instead of sending copies: they are empty afterwards (detached), and the copy is saved. Default false: the caller keeps its arrays.
onDone?readonly(info) => voidCalled once, right before the promise resolves.
onProgress?readonly(progress) => voidCalled with a simulation's positions as it cools (force), at most once per progress.interval. Without it no positions are sent before the result.
owner?readonlyunknownWhose layout this is (a trace, a view: any value). A new request for the same owner cancels the one before, whose promise rejects with an AbortError.
progress?readonlyLayoutProgressOptionsHow often positions are reported.
signal?readonlyAbortSignalAborting it cancels the layout; the promise rejects with the signal's reason.
slice?readonlynumberMilliseconds of work between two pauses (see LayoutRequest.slice). Default 8.
start?readonlyForceStartforce only: positions the simulation goes on from, and how warm it is there (the trace's force.start), instead of the spiral.
thread?readonly"auto" | "main"'main': do not use the worker for this request. Default 'auto'.

Released under the MIT License.