mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-26 17:30:07 +00:00
jquery removed
This commit is contained in:
@@ -116,7 +116,7 @@ var LiteGraph = {
|
||||
if( prototype[i].concat ) //array
|
||||
node[i] = prototype[i].concat();
|
||||
else if (typeof(prototype[i]) == 'object')
|
||||
node[i] = jQuery.extend({}, prototype[i]);
|
||||
node[i] = LiteGraph.cloneObject(prototype[i]); //slow but safe
|
||||
else
|
||||
node[i] = prototype[i];
|
||||
}
|
||||
@@ -248,6 +248,12 @@ var LiteGraph = {
|
||||
|
||||
if(LiteGraph.debug)
|
||||
console.log("Nodes reloaded");
|
||||
},
|
||||
|
||||
//separated just to improve if it doesnt work
|
||||
cloneObject: function(obj)
|
||||
{
|
||||
return JSON.parse( JSON.stringify( obj ) );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -985,8 +991,8 @@ LGraphNode.prototype.objectivize = function()
|
||||
pos: this.pos,
|
||||
size: this.size,
|
||||
data: this.data,
|
||||
properties: jQuery.extend({}, this.properties),
|
||||
flags: jQuery.extend({}, this.flags),
|
||||
properties: LiteGraph.cloneObject(this.properties),
|
||||
flags: LiteGraph.cloneObject(this.flags),
|
||||
inputs: this.inputs,
|
||||
outputs: this.outputs
|
||||
};
|
||||
@@ -1436,7 +1442,7 @@ LGraphNode.prototype.copyFromObject = function(info, ignore_connections)
|
||||
else if( info[j].concat ) //array
|
||||
this[j] = info[j].concat();
|
||||
else if (typeof(info[j]) == 'object') //object
|
||||
this[j] = jQuery.extend({}, info[j]);
|
||||
this[j] = LiteGraph.cloneObject(info[j]);
|
||||
else //value
|
||||
this[j] = info[j];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user