Skip to content

Interface: LayoutRequest ​

Page → worker: lay out a graph.

Properties ​

PropertyModifierTypeDescription
arrangementreadonly| "radial" | "preset" | "force" | "layered" | "tree" | "dendrogram" | "circular" | "grid" | "arc" | "hive"-
bundle?readonlyBundleOptionsBundle the links once the nodes are placed (bundleLinks): the result's routes are then the bundled ones. The positions are reported first, in a progress with settled.
graphreadonlyLayoutGraphThe worker's from here on (see the file comment).
idreadonlynumberChosen by the sender; every answer carries it.
options?readonlyunknownThe layout's own options (ForceOptions, LayeredOptions, …), as calc would pass them to the layout. They are cloned, so they must hold data only: no functions.
progress?readonlyfalse | LayoutProgressOptionsfalse: no progress messages. Default: LayoutProgressOptions' defaults.
slice?readonlynumberMilliseconds of work between two looks at the message queue (for a cancel, and on the main thread for everything else the page does). A tick is never cut, so a slice lasts at least one tick. Default 8.
start?readonlyForceStartforce only: positions the simulation goes on from instead of starting from the spiral, and how warm it is there (the trace's force.start). The result is then what the simulation ends on, neither centered nor cleared of overlaps afterwards.
typereadonly"layout"-

Released under the MIT License.