fix(widget): unexpected button callback call

`mousemove` event should not trigger callback of button widget
This commit is contained in:
NateScarlet
2019-04-24 16:17:23 +08:00
parent a80fdea469
commit 11f3f54575

View File

@@ -6892,6 +6892,9 @@ LGraphCanvas.prototype.processNodeWidgets = function( node, pos, event, active_w
switch( w.type )
{
case "button":
if(event.type === 'mousemove'){
break
}
if(w.callback)
setTimeout( function(){ w.callback( w, that, node, pos ); }, 20 );
w.clicked = true;