Skip to main content

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#

ParameterTypeDescription
newParametersPOptional new set of parameters to apply.
onCompleteLayoutResultsFunctionOptional function to call on completion of relayout.
magnetizeAfterLayoutbooleanDefaults to false. If true, the magnetizer will be run after the layout has completed.

Returns:

void