A handle for a node when using InteractiveOrganicLayout in interactive use cases.
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.
Type Details
- yFiles module
- algorithms
Properties
Gets or updates the inertia of the node.
Remarks
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 of0.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.
Property Value
0
and 1
Throws
- Exception({ name: 'ArgumentError' })
- if the given inertia value is negative or greater than
1
Gets or updates the radius of the node.
Remarks
Property Value
Gets or updates the stress value of the node.
Remarks
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]
.
Property Value
[0,1]
Throws
- Exception({ name: 'ArgumentError' })
- if the given stress value is negative or greater than
1
Methods
Schedules an update for the center location of the node.
Remarks
Parameters
A map of options to pass to the method.
- x - number
- the desired x-coordinate of the node
- y - number
- the desired y-coordinate of the node
Schedules an update for the center location of the node, including the z-coordinate.
Remarks
Parameters
A map of options to pass to the method.
- 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