mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 16:10:09 +00:00
fix in delay
This commit is contained in:
@@ -64,6 +64,7 @@ var LiteGraph = global.LiteGraph;
|
||||
function WidgetToggle()
|
||||
{
|
||||
this.addInput( "", "boolean" );
|
||||
this.addInput( "e", LiteGraph.ACTION );
|
||||
this.addOutput( "v", "boolean" );
|
||||
this.addOutput( "e", LiteGraph.EVENT );
|
||||
this.properties = { font: "", value: false };
|
||||
@@ -95,6 +96,12 @@ var LiteGraph = global.LiteGraph;
|
||||
ctx.textAlign = "left";
|
||||
}
|
||||
|
||||
WidgetToggle.prototype.onAction = function(action)
|
||||
{
|
||||
this.properties.value = !this.properties.value;
|
||||
this.trigger( "e", this.properties.value );
|
||||
}
|
||||
|
||||
WidgetToggle.prototype.onExecute = function()
|
||||
{
|
||||
var v = this.getInputData(0);
|
||||
|
||||
Reference in New Issue
Block a user