Magnetic Lines add snap-to-align guides while you drag nodes in Foblex Flow for Angular.
When a dragged node gets close to another node, the plugin shows alignment lines and can snap the node to:
This makes it easy to keep diagrams clean and consistent without manual pixel-perfect positioning.
[component.html] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/magnetic-lines/magnetic-lines.html [component.ts] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/magnetic-lines/magnetic-lines.ts [component.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/extensions/magnetic-lines/magnetic-lines.scss [common.scss] <<< https://raw.githubusercontent.com/Foblex/f-flow/main/projects/f-examples/_flow-common.scss
<f-magnetic-lines> inside <f-flow>.threshold in pixels for when guide rendering and snapping should begin.Tip: Start with
threshold="30–50"for a more Figma-like feel.
threshold controls when magnetic lines appear and when snapping is applied.
.f-magnetic-lines .f-line rule).