Skip to content

ForceLayout

Defined in: network/force.ts:72

new ForceLayout(graph, params?): ForceLayout

Defined in: network/force.ts:91

LayoutGraph

Partial<ForceParams> = {}

ForceLayout

run(iterations): void

Defined in: network/force.ts:193

Run iterations ticks.

number

void


setPinned(ids): void

Defined in: network/force.ts:110

Set the held (pinned) node set for an interactive drag (#140), replacing any previous one. Pinned nodes are left where the caller put them — tick won’t move them — so the drag session can hold them exactly under the cursor while the rest of the layout reheats around them. Pass null (or an empty iterable) to release every pin. Allocates the flag array lazily on first use.

Iterable<number, any, any> | null

void


tick(): void

Defined in: network/force.ts:118

Advance the simulation one step, mutating graph.positions.

void