Magnetic Rects add equal spacing snapping to Foblex Flow for Angular.
When you drag a node near a row or column of already aligned nodes, the plugin:
This is especially useful for building clean diagrams, UI flows, and node editors where consistent spacing matters.
[component.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/magnetic-rects/magnetic-rects.html [component.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/magnetic-rects/magnetic-rects.ts [component.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/magnetic-rects/magnetic-rects.scss [common.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/_flow-common.scss
<f-magnetic-rects> inside <f-flow>.alignThreshold for deciding when nodes count as aligned on the helper linespacingThreshold for deciding when the dragged node is close enough to snap into equal spacingTip: Start with
alignThreshold="30–50"andspacingThreshold="30–50"for a more Figma-like feel.
Defines the maximum distance (in px) for nodes to be treated as aligned on the same guide line.
Controls how close the dragged node must be to the “equal spacing” position before snapping is suggested.