hotNipi / node-red-contrib-ui-level

A linear level type widget to the Node-RED dashboard
MIT License
27 stars 6 forks source link

Updating Min/Max does not refresh ticks #37

Closed SaKiEQ closed 2 years ago

SaKiEQ commented 2 years ago

Describe the bug when sending msg.control to update min/mx values, the tick marks remain based on the manual values entered in the config panel. They do not seem to refresh or change one a message is sent.

Expected behavior Tick values, specially if left on Auto mode should refresh when msg.config { min / max} is sent.

Environment and versions (please complete the following information):

SaKiEQ commented 2 years ago

Screen Shot 2021-08-23 at 9 24 33 PM You see the left of the three vertical bars, look at the max / min values vs. the tick mark values.

The default setting of the widget is 0 - 2000 units, but a function scales the min/max via msg.control during run time. The ticks do not seem to react to any value change on max/min, or seg1/seg2 changes.

I assume they use the hard coded references to the widgets defaults ?

hotNipi commented 2 years ago

For auto mode considered as bug and will be fixed But if set for segments, it still stays as user responsibility to set new values via control message.

SaKiEQ commented 2 years ago

Yeah its in auto mode... since the min/max change dynamically to have more resolution / latitude in the level bar. I try to keep the actual value window as small as possible to see the deviation from the value better. Hence the min/max are with each level change newly computed and updated.

The config min/max values do not change on msg.control{min: max:}, they remain the manually set values. From what I can see in the code, its those 'defaults' are used to build the tick labels in auto mode, not the msg.control values.

hotNipi commented 2 years ago

update available.

SaKiEQ commented 2 years ago

Works like a charm :) Many Thanks !