litegraph.js
litegraph.js copied to clipboard
Callback called twice on Button Widget click
I made a 'toolbox' node, and a button widget inside it that creates a new node. Every time I click on the button, two nodes are created, one on "mouse up", one on "mouse down". This seems to be happening in the demos too, as the button is highlighted twice, on up and down mouse events. Is this a bug, or is there a special callback to define? Thanks
You need update this mouse event if (event.type === "mousemove") { to if (event.type === "mousedown") {
Just ran into this as well, why is that not the default? I can't imagine much of anyone wanting the current default double callback behavior