Often I need to connect the outputs of multiple nodes to one input of another node in the node-red web editor. This is currently quite tedious as I have to drag & drop a line from each output to the target node's input.
I work in engineering and am a user of Mathworks' Simulink. There block outputs can be comfortably connected by selecting source blocks and then Ctrl+Right clicking the target block. That function I would like to see in node-red, indeed!
It would also make connecting a single block to another block more convenient as a well aimed drag & drop isn't needed necessarily anymore.
Is it only me or could the user experience be improved this way?
Holler at me if I can help building a prototype. I'm not entirely new to building stuff for node-red.
You can wire the output of a node (or multiple outputs) into multiple nodes. Or you can wire together a series of nodes.
But sadly, you cannot wire a parallel set of nodes to a single node input.
Thanks! What I am missing is exactly the "Wire Multiple To Node"
@knolleary Is it reasonable if I create an implementation for this feature I proposed and then create a pull request on the dev branch (while adhering to the contribution guide) or is that particular feature unsuitable/inappropriate for node-red as nobody else has been wanting it?
I'd like to get a short heads up before I start doing anything that may be in vain
My first idea would be having a command on the keyboard shortcut list that works the other way round than "wire-node-to-multiple", i.e. having "wire-multiple-to-node" that connects outputs of selected nodes to the input of the lastly selected node.
Sorry for bumping and being eager.
A pr would be welcome. Would probably live in view-tools.js alongside the other actions.
@knolleary I've created a PR on github.
The change was rather small. Yet, I already let out a relieving sigh on every opportunity that I can use it on
At least for me it feels great. Create a keyboard shortcut and enjoy smoothly connecting nodes with one another!
I could not let it go...
As proposed in my first post I added the "Ctrl+RMB" gesture to quickly connect nodes with one-another prototypically to node red.
And oh boy, it feels good and intuitive to use! Here is a short screen capture of the functionality in action:
I feel like this small change could dramatically improve user-friendlieness. I suggest you try it yourself! I pushed it to my fork on github on the
What do you think?
The implementation basically uses the same code I implemented for the PR for the
wire-multiple-to-node keybinding but lives in
editor-client/src/js/ui/view.js. Is there a common place where such functionality could be put into?
Edit: I should probably have opened this topic in "Core development"... silly me. Can someone move it?
Are you aware you can already wire two nodes by ctrl-clicking on port, keeping ctrl pressed and then click on the node to connect to? No need to drag the mouse at all.
If you keep ctrl held, you can then click on the next node in the flow to wire in. It's more geared up for wiring a series of nodes then multiple to one, so a bit different to this, but the idea is there.
I did NOT know that! I only knew the "wire series of nodes" keyboard shortcut. That is indeed nifty.
Do you see any chance that this could be extended to the case where multiple source nodes should be connected to a single node at once?
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.