mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 09:19:43 +00:00
fixing serialize link
This commit is contained in:
@@ -1509,6 +1509,16 @@
|
|||||||
for (var i in this.links) {
|
for (var i in this.links) {
|
||||||
//links is an OBJECT
|
//links is an OBJECT
|
||||||
var link = this.links[i];
|
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());
|
links.push(link.serialize());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1948,6 +1958,20 @@
|
|||||||
return this.title || this.constructor.title;
|
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 *************************
|
// Execution *************************
|
||||||
/**
|
/**
|
||||||
* sets the output data
|
* 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
|
* assigns a canvas
|
||||||
*
|
*
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user