This commit is contained in:
tamat
2018-12-03 16:28:20 +01:00
parent c1f9db516a
commit f5e6dd282e
4 changed files with 666 additions and 450 deletions

View File

@@ -6258,11 +6258,15 @@ LGraphCanvas.prototype.processNodeWidgets = function( node, pos, event, active_w
break;
case "toggle":
if( event.type == "mousedown" )
{
w.value = !w.value;
if(w.callback)
setTimeout( function(){ w.callback( w.value, that, node, pos ); }, 20 );
}
break;
case "text":
if( event.type == "mousedown" )
this.prompt( "Value", w.value, (function(v){ this.value = v; }).bind(w), event );
this.prompt( "Value", w.value, (function(v){ this.value = v; if(w.callback) w.callback(v, that, node ); }).bind(w), event );
break;
}