Closed bartbutenaers closed 4 years ago
Good idea! I'll go through the code in more detail as soon as I can.
Quick question: does the active state persist between restarts of node-red?
Quick answer: I added a mix of buttons (enabled and disabled) to my flows and their state was persisted. Did some redeploys and even after a restart of my Node-Red, all buttons maintained their status. Enough for today ;-)
@rikukissa ,
Sorry for the delay, but it is rather busy at the moment ...
The only thing I find confusing about this button: when your node is located on a disabled flow tab, the user will get a popup "node is not deployed" when he presses the button. This is in fact correct: when the flow tab is disabled, the nodes of that flow are not deployed (so the nodeexists == false). So you cannot (de)activate such a node with the button.
But the users will not always immediately think about the flow tab being disabled.
Any suggestions on this one?? Some possible solutions:
But the Debug node has the same behaviour!!!
Bart
Hi Riku (@rikukissa ),
I'm going to wait with my 2 new pull requests (one for displaying image properties, and one for the grab handle) until you have approved and merged this one into your master. Otherwise my fork is going to become a mess...
Hope to hear from you soon, Bart
Hello Riku (@rikukissa ),
Did you had already a chance to have a look at the changes. Would be great if we could finish the pull requests, so you can get rid of your poltergeist ;-)
Thanks, Bart
Hi Riku (@rikukissa),
I currently use your contribution for displaying image data, identical like I use the Debug node for displaying non-image data (json, buffers, ...).
But the Debug node has a nice extra feature, which is enable or disable displaying data: by simply pressing a button. I have reused part of their js and html code to add a similar button to your node.
When the button is pressed, it will go half way beneath the node and no more images will be pushed from the server. When the button is pressed again, it will become entirely visible again and images will again be pushed from the server:
I would appreciate if you could test this, and have a look whether you want to add this functionality to your new version.
P.S. not all of the history-related code in the html is clear to me, but it seems to do the job ...
Thanks a lot, Bart