Link node/link in node/link out node

where can i find link node code?

Hi @tanya

https://github.com/node-red/node-red/tree/master/packages/node_modules/%40node-red/nodes/core/common

Thanks Knolleary

Can I ask what in particular you are interested in seeing about them?

i just need similar kind of UI for my customized node

1 Like

Is there some missing functionality that may make sense in the existing nodes ?

nothing such. it looks perfect ow it is as of now

I'm building a lot of custom nodes for a complex flow/functionality and I need to internally (not using wires) link between some nodes based on their name or other property...
To do that, I'm internally adding .links property to OUT nodes and they notify my IN node by sending a message to all IDs in .links
There's a problem with that - my IN node can add (onadd), update (oneditsave), delete (ondelete) however there's no way to handle an UNDO, which completely messes up the links.
Also, I'd like to have a visual feedback as to which nodes are connected to which other nodes internally, similar to how link-in and link-out show it when selected in the flow.
I've tried to find out how this is done in the link-in/link-out pair but ... it seems that all of that functionality is hard-coded for these two nodes all over the dashboard :frowning:

What I'd like to be able to do in custom nodes is somehow inherit them from link-in and link-out nodes to get the same linking functionality (or similar - I'd like to control the editor UI, but the rest can be as is for link-in/link-out) ... This would be extremely useful for node authors.

Here's an example - I have several types of OUT nodes and then I have consumers (IN nodes) where I can select the Type first and based on the type it lists all OUT nodes of that type for me to choose (one or more) to link from... This simplifies the selection process by grouping OUT links by type not by Flow.
For that same reason, I wanted the IN note to be able to change its background color based on the selected OUT source node (the oneditsave would determine, at the design time, what that color should be) - but that doesn't seem to be possible yet (I hope it will be considered).

I could use the link-in and link-out nodes for that, but then there's a mess with way too many extra link nodes having the same names as my custom nodes and ... I need to show the status under each OUT node showing its 'current value' (based on the last seen message)...

Best to keep this to 1 thread I think. Closing this one for now - let me know if it needs reopening.