Home > @jsplumbtoolkit/core > JsPlumbToolkit > eachNode
JsPlumbToolkit.eachNode() method
Iterates through all Nodes in the Toolkit one at a time. You should not perform destructive editing of the dataset inside one of these loops.
Signature:
eachNode(fn: (idx: number, node: Node) => void): void;
Parameters
Parameter | Type | Description |
---|---|---|
fn | (idx: number, node: Node) => void | A function that takes (index, node) as arguments and is applied for every Node in the Toolkit instance. |
Returns:
void