Skip to main content

Home > @jsplumbtoolkit/core > AbstractLayout > magnetize

AbstractLayout.magnetize() method

Run the magnetizer.

Signature:

magnetize(params: {
options?: MagnetizerRunOptions<any>;
origin?: PointXY;
focus?: string;
}, internal: boolean): Record<string, {
original: PointXY;
current: PointXY;
}>;

Parameters

ParameterTypeDescription
params{ options?: MagnetizerRunOptions<any>; origin?: PointXY; focus?: string; }Options for the magnetizer.
internalbooleanwhether or not the magnetize call was made by the layout itself.

Returns:

Record<string, { original: PointXY; current: PointXY; }>