Home > @jsplumbtoolkit/core > JsPlumbToolkit > batch
JsPlumbToolkit.batch() method
Suspends rendering and then runs the given function, unsuspending rendering afterwards and doing a refresh. This method is just a convenience method that handles suspending and subsequent enabling of rendering. You might use this if you're adding a whole load of Nodes or Edges, or maybe you want to add a Node and one or more Edges before the layout recomputes.
Signature:
batch(fn: () => any): void;
Parameters
Parameter | Type | Description |
---|---|---|
fn | () => any |
Returns:
void