Home > @jsplumbtoolkit/browser-ui > Surface > magnetize
Surface.magnetize() method
Magnetize the elements in the display. If focus
is provided it will be used as the origin for magnetization, and not moved. If no focus
is provided, the computed center of all the elements will be used as the origin.
Signature:
magnetize(focus?: string | Vertex): void;
Parameters
Parameter | Type | Description |
---|---|---|
focus | string | Vertex |
Returns:
void