States
Summary
Element states
text
All nodes currently in the React Flow chart as JSON text. Updated only when "Export to JSON" action is triggered for optimal performance.
text
All edges (connections) currently in the React Flow chart as JSON text. Updated only when "Export to JSON" action is triggered for optimal performance.
list
List of IDs of nodes that were moved in the last position change event. Use with node changed position event to get all nodes that moved together.
list
List of new X coordinates for nodes that were moved in the last position change event. Corresponds to the same index in updated nodes ID.
list
List of new Y coordinates for nodes that were moved in the last position change event. Corresponds to the same index in updated nodes ID.
list
List of IDs of nodes that were deleted in the last node removal event. Use with node removed event to get all nodes that were deleted together.
text
ID of the source node for the edge that was created in the last edge addition event. Use with edge added event to get edge details.
text
ID of the target node for the edge that was created in the last edge addition event. Use with edge added event to get edge details.
list
Array of edge IDs that were deleted in the last edge removal event. Use with edge removed event to get edge details.
list
Array of source nodes IDs of the edges that were deleted in the last edge removal event. Use with edge removed event to get edge details.
list
Array of target nodes IDs of the edges that were deleted in the last edge removal event. Use with edge removed event to get edge details.
text
ID of the node that was clicked in the last node click event. Use with node clicked event to identify which node was selected.
text
ID of the edge that was clicked in the last edge click event. Use with edge clicked event to identify which edge was selected.
list
List of IDs of all currently selected nodes. Updates automatically when selection changes.
list
List of IDs of all currently selected edges. Updates automatically when selection changes.
number
Current X coordinate of the mouse cursor in flow coordinate space. Useful for creating nodes using drag & drop.
number
Current Y coordinate of the mouse cursor in flow coordinate space. Useful for creating nodes using drag & drop.
text
ID of the source node when an edge is dropped on the canvas without connecting to a target. Use with edge dropped on canvas event to handle node creation on edge drop.
Element states
nodes JSON
Type: text
All nodes currently in the React Flow chart as JSON text. Updated only when "Export to JSON" action is triggered for optimal performance.
edges JSON
Type: text
All edges (connections) currently in the React Flow chart as JSON text. Updated only when "Export to JSON" action is triggered for optimal performance.
updated nodes IDs
Type: list
List of IDs of nodes that were moved in the last position change event. Use with node changed position event to get all nodes that moved together.
updated nodes Xs
Type: list
List of new X coordinates for nodes that were moved in the last position change event. Corresponds to the same index in updated nodes ID.
updated nodes Ys
Type: list
List of new Y coordinates for nodes that were moved in the last position change event. Corresponds to the same index in updated nodes ID.
removed nodes IDs
Type: list
List of IDs of nodes that were deleted in the last node removal event. Use with node removed event to get all nodes that were deleted together.
added edge source
Type: text
ID of the source node for the edge that was created in the last edge addition event. Use with edge added event to get edge details.
added edge target
Type: text
ID of the target node for the edge that was created in the last edge addition event. Use with edge added event to get edge details.
removed edges IDs
Type: list
Array of edge IDs that were deleted in the last edge removal event. Use with edge removed event to get edge details.
removed edges sources
Type: list
Array of source nodes IDs of the edges that were deleted in the last edge removal event. Use with edge removed event to get edge details.
removed edges targets
Type: list
Array of target nodes IDs of the edges that were deleted in the last edge removal event. Use with edge removed event to get edge details.
clicked node ID
Type: text
ID of the node that was clicked in the last node click event. Use with node clicked event to identify which node was selected.
clicked edge ID
Type: text
ID of the edge that was clicked in the last edge click event. Use with edge clicked event to identify which edge was selected.
selected nodes IDs
Type: list
List of IDs of all currently selected nodes. Updates automatically when selection changes.
selected edges IDs
Type: list
List of IDs of all currently selected edges. Updates automatically when selection changes.
mouse flow X
Type: number
Current X coordinate of the mouse cursor in flow coordinate space. Useful for creating nodes using drag & drop.
mouse flow Y
Type: number
Current Y coordinate of the mouse cursor in flow coordinate space. Useful for creating nodes using drag & drop.
dropped edge source ID
Type: text
ID of the source node when an edge is dropped on the canvas without connecting to a target. Use with edge dropped on canvas event to handle node creation on edge drop.
Last updated