fixes in some funcs

This commit is contained in:
tamat
2013-10-08 18:26:29 +02:00
parent 023f5d936e
commit d9d998336d
3 changed files with 34 additions and 4 deletions

View File

@@ -1054,6 +1054,12 @@ LGraphNode.prototype.getInputData = function(slot)
return null;
}
LGraphNode.prototype.isInputConnected = function(slot)
{
if(!this.inputs) return null;
return (slot < this.inputs.length && this.inputs[slot].link != null);
}
LGraphNode.prototype.getInputInfo = function(slot)
{
if(!this.inputs) return null;
@@ -1071,6 +1077,12 @@ LGraphNode.prototype.getOutputInfo = function(slot)
return null;
}
LGraphNode.prototype.isOutputConnected = function(slot)
{
if(!this.outputs) return null;
return (slot < this.outputs.length && this.outputs[slot].links && this.outputs[slot].links.length);
}
LGraphNode.prototype.getOutputNodes = function(slot)
{
if(!this.outputs || this.outputs.length == 0) return null;
@@ -1795,6 +1807,8 @@ LGraphNode.prototype.trace = function(msg)
if(!this.console)
this.console = [];
this.console.push(msg);
if(this.console.length > LGraphNode.MAX_CONSOLE)
this.console.shift();
this.graph.onNodeTrace(this,msg);
}