bartbutenaers / node-red-contrib-ui-svg

A Node-RED widget node to show interactive SVG (vector graphics) in the dashboard
Apache License 2.0
94 stars 27 forks source link

multiple nodes, with same SVG file, in different Groups ,but same Tab working with errors!! #118

Open doit4fun opened 1 year ago

doit4fun commented 1 year ago

I have the following issue: 1.I'm using different nodes of node-red-contrib-ui-svg but I load them with the same .SVG file thus all nodes will contain the same id's of SVG (since is the same SVG file). 2.After that I place the different nodes of node-red-contrib-ui-svg in different Groups in the same Tab. So I have multiple Groups containing different nodes that have the same .SVG file.

The issue is that when the same msg.payload is sent in the flow to a specific node... it will update the first group that finds the node and not the flow node that I want. So I see the graphical modification of the node in the first Group. The group that contains the right node is not Updated. I have to build a .SVG file with different IDs for each node. This doesn't happen when I place the node in a separate Tab.

So the problem is that you have multiple groups in a tab, each group with different node , but containing the same svg file ... the msg.paylod will not be done for the node in the flow it will be done on the first group that encounters the elements defined in the payload.

could you fix this? because it is annoying to build SVG with different ids... in order to use them in different groups on the same Tab

bartbutenaers commented 1 year ago

Hi @doit4fun,

it will update the first group that finds the node and not the flow node that I want.

Can you explain that a bit more? And a screensot and a (simplified) flow o reproduce this would help. I have never used the Groups feature in Node-RED. So no clue at the moment why this fails...

Bart