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

Keep track of current SVG state for dashboard reload #126

Closed TruDan closed 1 year ago

TruDan commented 1 year ago

Hi,

First and foremost - great node/library, works really well for my use case!

I do have one feature request however, not a big deal but a small detail. When loading the node-red dashboard, you don't receive the current state of the SVG, but rather the initial state and then any events/commands received after loading. It would be nice if internally it kept track of the SVG state and showed that on initial load.

For example having a diagram showing an on/off state of say a light bulb. It should show the current state of said object instead of waiting for that command to be sent again.

bartbutenaers commented 1 year ago

Hi @TruDan,

I do have one feature request however, not a big deal but a small detail

Well it is completely the opposite. Your feature request is unfortunately impossible with this node. The current Node-RED dashboard does not support this kind of stuff: the dashboard pushes the empty state and simply replays the LAST message only. Which has been an issue for a lots of users in the past...

Currently a new dashboard for Node-RED is in early-alpha status, and I have asked them a few weeks ago (see here) to take that into account. To make sure this will become possible in the future. However take into account that old ui nodes (like this svg node) can NOT be used in that new dashboard.

Sorry! Bart