Snap to grid, all - shortcut

There is a snap to grid option, which applies to individual nodes.

I understand it might be a complex implementation, but it would be nice if there would a shortcut to snap all selected nodes to the grid, it is cumbersome to move them individually, especially after changing the grid size. Node alignment options would also be nice addition.

1 Like

That would be a nice feature. :grinning:

To go even one step further... automatic layout of the flow graph. :speak_no_evil:

If you look under the keyboard shortcuts dialog, you'll see there is already an action called 'Align Selection To Grid'. It doesn't have a default keyboard shortcut assigned, but you are free to do so.

I've played around with that, but it is a very hard problem to do well. I found a graph layout algorithm that came close to being okay, but it added about 1Mb of javascript to the editor and was very slow. Maybe something that could be done in native code using WebAssembly to improve performance.... but not high on my todo list.

5 Likes

If you look under the keyboard shortcuts dialog, you'll see there is already an action called 'Align Selection To Grid'. It doesn't have a default keyboard shortcut assigned, but you are free to do so.

I knew before I made the topic that I have probably overlooked it somewhere :exploding_head:
thanks once again.

Hi Nick (@knolleary), solely for my personal curiosity. Would be nice if you could share a link to what you found. PS. Don't panic now, I will not wrap it into a contribution :rofl: