fix in delay

This commit is contained in:
tamat
2018-06-21 22:49:22 +02:00
parent 1b14b8aa78
commit f2a11fc9df
4 changed files with 175 additions and 162 deletions

View File

@@ -122,7 +122,6 @@ DelayEvent.prototype.onAction = function(action, param)
DelayEvent.prototype.onExecute = function()
{
var dt = this.graph.elapsed_time * 1000; //in ms
console.log(this._pending);
for(var i = 0; i < this._pending.length; ++i)
{

View File

@@ -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);