Home > @jsplumbtoolkit/core > AbstractLayout > relayout
AbstractLayout.relayout() method
Runs the layout, first doing a reset of element positions. Next, if the subclass has defined a begin method, that will be called first. Then, the subclass's step method will be called repeatedly, until the subclass makes a call to _super.setDone. Use the layout method to run the layout incrementally without first resetting everything.
Signature:
relayout(newParameters: P, onComplete: LayoutResultsFunction, magnetizeAfterLayout: boolean): void;
Parameters
| Parameter | Type | Description |
|---|---|---|
| newParameters | P | Optional new set of parameters to apply. |
| onComplete | LayoutResultsFunction | Optional function to call on completion of relayout. |
| magnetizeAfterLayout | boolean | Defaults to false. If true, the magnetizer will be run after the layout has completed. |
Returns:
void