mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-03 06:47:33 +00:00
fixing serialize link
This commit is contained in:
@@ -1509,6 +1509,16 @@
|
||||
for (var i in this.links) {
|
||||
//links is an OBJECT
|
||||
var link = this.links[i];
|
||||
if(!link.serialize) //weird bug I havent solved yet
|
||||
{
|
||||
console.warn("weird LLink bug, link info is not a LLink but a regular object");
|
||||
var link2 = new LLink();
|
||||
for(var i in link)
|
||||
link2[i] = link[i];
|
||||
this.links[i] = link2;
|
||||
link = link2;
|
||||
}
|
||||
|
||||
links.push(link.serialize());
|
||||
}
|
||||
|
||||
@@ -1948,6 +1958,20 @@
|
||||
return this.title || this.constructor.title;
|
||||
};
|
||||
|
||||
/**
|
||||
* sets the value of a property
|
||||
* @method setProperty
|
||||
* @param {String} name
|
||||
* @param {*} value
|
||||
*/
|
||||
LGraphNode.prototype.setProperty = function(name, value) {
|
||||
if(!this.properties)
|
||||
this.properties = {};
|
||||
this.properties[name] = value;
|
||||
if (this.onPropertyChanged)
|
||||
this.onPropertyChanged(name, value);
|
||||
};
|
||||
|
||||
// Execution *************************
|
||||
/**
|
||||
* sets the output data
|
||||
@@ -3792,6 +3816,15 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* returns the visualy active graph (in case there are more in the stack)
|
||||
* @method getCurrentGraph
|
||||
* @return {LGraph} the active graph
|
||||
*/
|
||||
LGraphCanvas.prototype.getCurrentGraph = function() {
|
||||
return this.graph;
|
||||
}
|
||||
|
||||
/**
|
||||
* assigns a canvas
|
||||
*
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user