Question about NodeEditor "Switch" Node

 From:  bemfarmer
9984.3 In reply to 9984.2 
The Switch Widget is in the interface.js file, at the end.

1. Adding two more inputs and one more output is easy. Just copy the code. (no need to add input id numbers 2 and 3 and output ID 1?)

2. Adding the link is easy, just copy the code referencing inputs 0 and 1 and output 0, to reference inputs 2 and 3, and output 1.

3. Also to add is the connecting "wire". Probably duplicate (or add to) some particular portions of existing code for "ctx". (not tried)
Click switching switches both poles. They do not switch independently. So both wires would alter state together, upon click.

4. Also duplicate the code re: Numbers (numarray) / Points (pointarray) / Objects (objectlist), re inputs 2, 3, and output 1. (not tried)

Leave the original interface.js intact.
Add a new DPDT.js node.

As an amateur javascript programmer, Max's code is hard to understand.
Adding multiple inputs is done in other nodes, somehow.
No more time to play today, must go to work.

- Brian

EDITED: 20 Oct 2020 by BEMFARMER