ForceSimulation
@graph-viz › Globals › layouts › ForceSimulation
Hierarchy
- ForceSimulation
Index
Properties
Methods
Object literals
Properties
Private
Readonly
config
• config: Required‹ForceConfig› = FORCE_DEFAULTS
Defined in packages/layouts/src/ForceSimulation.ts:165
Private
defaultLinkForceStrengths
• defaultLinkForceStrengths: number[] = []
Defined in packages/layouts/src/ForceSimulation.ts:167
simulation
• simulation: D3Simulation | undefined
Defined in packages/layouts/src/ForceSimulation.ts:156
staticMode
• staticMode: boolean = false
Defined in packages/layouts/src/ForceSimulation.ts:157
Methods
Private
execManualTicks
▸ execManualTicks(): void
Defined in packages/layouts/src/ForceSimulation.ts:241
Returns: void
getNodePositions
▸ getNodePositions(): NodePosition[]
Defined in packages/layouts/src/ForceSimulation.ts:249
Returns: NodePosition[]
initialize
▸ initialize(graph
: SimulationData, config
: ForceConfig, staticMode
: boolean): void
Defined in packages/layouts/src/ForceSimulation.ts:169
Parameters:
Name | Type | Default |
---|---|---|
graph | SimulationData | - |
config | ForceConfig | FORCE_DEFAULTS |
staticMode | boolean | false |
Returns: void
onTick
▸ onTick(callback
: function): void
Defined in packages/layouts/src/ForceSimulation.ts:262
Parameters:
▪ callback: function
▸ (nodePositions
: NodePosition[]): void
Parameters:
Name | Type |
---|---|
nodePositions | NodePosition[] |
Returns: void
reheat
▸ reheat(): void
Defined in packages/layouts/src/ForceSimulation.ts:334
Returns: void
restart
▸ restart(): void
Defined in packages/layouts/src/ForceSimulation.ts:323
Returns: void
settle
▸ settle(): void
Defined in packages/layouts/src/ForceSimulation.ts:344
Returns: void
stop
▸ stop(): void
Defined in packages/layouts/src/ForceSimulation.ts:351
Returns: void
update
▸ update(graph
: SimulationData): void
Defined in packages/layouts/src/ForceSimulation.ts:306
Parameters:
Name | Type |
---|---|
graph | SimulationData |
Returns: void
updateConfig
▸ updateConfig(newConfig?
: ForceConfig): void
Defined in packages/layouts/src/ForceSimulation.ts:270
update config and force simulation as needed
Parameters:
Name | Type | Description |
---|---|---|
newConfig? | ForceConfig |
Returns: void
Object literals
Private
registeredEventHandlers
▪ registeredEventHandlers: object
Defined in packages/layouts/src/ForceSimulation.ts:158
tick
• tick: noop = noop
Defined in packages/layouts/src/ForceSimulation.ts:162