C

InteractiveOrganicNodeHandle

A handle for a node when using InteractiveOrganicLayout in interactive use cases.
Inheritance Hierarchy

Remarks

Before the layout starts, it uses the values in the handle as input for the node. When the layout quits, it writes back the calculated locations of the nodes to this instance. This is important for the scenario that a layout is stopped and is resumed later.

Instances of InteractiveOrganicNodeHandle can be queried via layout data property nodeHandles. Alternatively, when working only with the LayoutGraph API, see NODE_HANDLE_DATA_KEY.

See Also

Developer's Guide

Members

No filters for this type

Properties

Gets or updates the inertia of the node.

The inertia is defined to be a value from the interval [0,1].

  • 1.0: The node will not move.
  • 0.5: The node will only move half as far as it would with an inertia of 0.0.
  • 0.0: The node will move as fast as possible.

This method can be used while layout calculation is in progress (interactive layout scenarios). However, the change will not directly be applied to the graph itself. To make sure that the layout algorithm is active, it can be woken up after scheduling this update.

final

Property Value

an inertia value between 0 and 1

Throws

Exception ({ name: 'ArgumentError' })
if the given inertia value is negative or greater than 1

See Also

Developer's Guide
Gets or updates the radius of the node.
This method can be used while layout calculation is in progress (interactive layout scenarios). However, the change will not directly be applied to the graph itself. To make sure that the layout algorithm is active, it can be woken up after scheduling this update.
final

Property Value

the desired radius for the node

See Also

Developer's Guide
Gets or updates the stress value of the node.

The stress value indicates how far a node will possibly move. The higher the stress of a node is, the farther it may move.

This method can be used while layout calculation is in progress (interactive layout scenarios). However, the change will not directly be applied to the graph itself. To make sure that the layout algorithm is active, it can be woken up after scheduling this update.

The stress value is defined to be a value from the interval [0,1].

final

Property Value

the stress value in the interval [0,1]

Throws

Exception ({ name: 'ArgumentError' })
if the given stress value is negative or greater than 1

Methods

Returns the current center of the node.
final

Return Value

Point
the current center of the node

See Also

Developer's Guide
Returns the current z-coordinate of the node.
final

Return Value

number
the current z-coordinate of the node
Schedules an update for the center location of the node.
This method can be used while layout calculation is in progress (interactive layout scenarios) for updating node positions due to user interaction (e.g. dragging). However, the change will not directly be applied to the graph itself. To make sure that the layout algorithm is active, it can be woken up after scheduling this update.
final

Parameters

x: number
the desired x-coordinate of the node
y: number
the desired y-coordinate of the node

See Also

Developer's Guide
Schedules an update for the center location of the node, including the z-coordinate.
This method can be used while layout calculation is in progress (interactive layout scenarios) for updating node positions due to user interaction (e.g. dragging). However, the change will not directly be applied to the graph itself. To make sure that the layout algorithm is active, it can be woken up after scheduling this update.
final

Parameters

x: number
the desired x-coordinate of the node
y: number
the desired y-coordinate of the node
z: number
the desired z-coordinate of the node