Auto arrange nodes

934 views
Skip to first unread message

Ben Sainsbury

unread,
Jul 23, 2015, 7:58:44 PM7/23/15
to Node-RED
Hi there. New here. Love Node-Red; all my dreams have come true.

Wondering if anyone has developed a plugin of some sort to auto-arrange complex flows?
thank you.

Nicholas O'Leary

unread,
Jul 30, 2015, 4:02:39 PM7/30/15
to Node-RED Mailing LIst
Hi Ben,

no, we don't have anything like that. If anyone wants to have a go - feel free.

Not quite what you're looking for, but if you press Shift after you start dragging a node, it snaps to a grid - makes it easier to line up.

Nick



--
http://nodered.org
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cin...@gmail.com

unread,
Jul 30, 2015, 5:56:15 PM7/30/15
to Node-RED, redt...@gmail.com
Hi,

as the name implies, node-red can be seen as a graph with vertices and edges. Drawing a nice and good looking visual representation of graphs automatically is not that easy. The latex package tikz (see http://ftp.math.purdue.edu/mirrors/ctan.org/graphics/pgf/base/doc/pgfmanual.pdf at page 364) has very useful information about this. The easiest way of doing that (a few nested for loops) is a force-based method. Think of the nodes as charged balls that want to maximize their distance. At the same time, you constrain the maximum distance of two connected nodes. This gives you quite nice graph plots.

Julian Knight

unread,
Jul 31, 2015, 1:51:01 PM7/31/15
to Node-RED, redt...@gmail.com, cin...@gmail.com
Ha, it would be MASSIVELY cool to be able to do force auto arrange! But, as anyone who has used such systems can testify, they will make a complete mess as often as they sort things out :)

I'm personally happy with what we have, the proposed sub-flows and the future ideas on links between tabs will help with more complex layouts too. There is so much else to do that will have much bigger benefits for all.

As Nick say's though, if someone wanted to have a go, I'm sure many of us would cheer from the sidelines :)

Ben Sainsbury

unread,
Jul 31, 2015, 2:06:19 PM7/31/15
to Julian Knight, Node-RED, cin...@gmail.com
All of your input is much appreciated and yes, agreed that they can mess things up just as much as they can improve them.
but didn't spend too much time with it.

Thank you for your responses and work,
ben

Dave C-J

unread,
Jul 31, 2015, 3:25:19 PM7/31/15
to node...@googlegroups.com

Node-RED is built on the awesome d3 library... And there are examples of how to do force directed layouts with d3 all over... But the constraints imposed by the wiring and natural left to right flow and (to some extent) variable sizes of nodes would make this more than a trivial task to get a universally good result.... But hey all good fun to try if you like.

Reply all
Reply to author
Forward
0 new messages