Making a new ui_slider node

My apologies if this question has already been answered.

What is the recommend way of taking an existing node, in this case slider and start modifying existing code?

Specifically, how does one setup the workflow? Where store the new code, how to "run" it. Once I'm happy with the functionality, how to store the results?

My objective is to change the ui_slider node so that input and output are separated. With separated I mean that node status shows input. Here node status is slider position. User interaction is reflected in output only. User interaction is the moving the slider. The ui_switch allows for this. It seems that some consideration gas already been given to this functionality in ui_slider.js:

        if (!node.pt) {
            node.on("input", function(msg) {
                node.state[0] = msg.payload;
                node.status({shape:"dot",fill:"grey",text:node.state[0] + " | " + node.state[1]});
            });
        }

This is not an easy topic to cover, certainly one that can't be answered with a single post
I suggest reading about the ingredients involved, which will allow you to understand the workflow.

https://nodered.org/docs/creating-nodes/

I have moved this to Developing Nodes

If you make sure


is not checked then the inout and output are separate already....
Is that what you want ?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.