This commit is contained in:
tamat
2018-05-18 14:50:49 +02:00
parent f9faa1a777
commit f74bf4109e
11 changed files with 649 additions and 146 deletions

View File

@@ -170,7 +170,7 @@ var LiteGraph = global.LiteGraph = {
console.log("Node registered: " + type);
var categories = type.split("/");
var classname = base_class.constructor.name;
var classname = base_class.name;
var pos = type.lastIndexOf("/");
base_class.category = type.substr(0,pos);
@@ -1112,7 +1112,7 @@ LGraph.prototype.findNodesByType = function(type)
/**
* Returns a list of nodes that matches a name
* @method findNodesByName
* @method findNodesByTitle
* @param {String} name the name of the node to search
* @return {Array} a list with all the nodes with this name
*/
@@ -1323,7 +1323,7 @@ LGraph.prototype.removeGlobalOutput = function(name)
LGraph.prototype.setInputData = function(name,value)
{
var nodes = this.findNodesByName( name );
var nodes = this.findNodesByTitle( name );
for(var i = 0, l = nodes.length; i < l; ++i)
nodes[i].setValue(value);
}
@@ -1337,7 +1337,7 @@ LGraph.prototype.setInputData = function(name,value)
LGraph.prototype.getOutputData = function(name)
{
var n = this.findNodesByName(name);
var n = this.findNodesByTitle(name);
if(n.length)
return m[0].getValue();
return null;
@@ -1347,14 +1347,14 @@ LGraph.prototype.getOutputData = function(name)
LGraph.prototype.triggerInput = function(name,value)
{
var nodes = this.findNodesByName(name);
var nodes = this.findNodesByTitle(name);
for(var i = 0; i < nodes.length; ++i)
nodes[i].onTrigger(value);
}
LGraph.prototype.setCallback = function(name,func)
{
var nodes = this.findNodesByName(name);
var nodes = this.findNodesByTitle(name);
for(var i = 0; i < nodes.length; ++i)
nodes[i].setTrigger(func);
}