litegraph.js icon indicating copy to clipboard operation
litegraph.js copied to clipboard

Function in button widgets is called twice

Open AlexandrTomin opened this issue 5 years ago • 2 comments

This change will be avoid twice click of button.

if (event.type === "mousemove") {break;} to if (event.type === "mousedown") {break;}

AlexandrTomin avatar Apr 22 '20 11:04 AlexandrTomin

This is true. I would instead change the code to call the function only with the correct event instead of breaking on a "bad" one.

if (event.type === "mousedown"){ // or "mouseup" ?

}

atlasan avatar Jan 08 '21 10:01 atlasan

hard to do the merge, the automatic gets crazy

jagenjo avatar Jan 08 '21 10:01 jagenjo