Skip to content

Commit eb0407e

Browse files
Update litegraph to latest.
1 parent 7339479 commit eb0407e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

web/lib/litegraph.core.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2533,7 +2533,7 @@
25332533
var w = this.widgets[i];
25342534
if(!w)
25352535
continue;
2536-
if(w.options && w.options.property && this.properties[ w.options.property ])
2536+
if(w.options && w.options.property && (this.properties[ w.options.property ] != undefined))
25372537
w.value = JSON.parse( JSON.stringify( this.properties[ w.options.property ] ) );
25382538
}
25392539
if (info.widgets_values) {
@@ -4928,9 +4928,7 @@ LGraphNode.prototype.executeAction = function(action)
49284928
this.title = o.title;
49294929
this._bounding.set(o.bounding);
49304930
this.color = o.color;
4931-
if (o.font_size) {
4932-
this.font_size = o.font_size;
4933-
}
4931+
this.font_size = o.font_size;
49344932
};
49354933

49364934
LGraphGroup.prototype.serialize = function() {
@@ -5714,10 +5712,10 @@ LGraphNode.prototype.executeAction = function(action)
57145712
* @method enableWebGL
57155713
**/
57165714
LGraphCanvas.prototype.enableWebGL = function() {
5717-
if (typeof GL === undefined) {
5715+
if (typeof GL === "undefined") {
57185716
throw "litegl.js must be included to use a WebGL canvas";
57195717
}
5720-
if (typeof enableWebGLCanvas === undefined) {
5718+
if (typeof enableWebGLCanvas === "undefined") {
57215719
throw "webglCanvas.js must be included to use this feature";
57225720
}
57235721

@@ -7110,15 +7108,16 @@ LGraphNode.prototype.executeAction = function(action)
71107108
}
71117109
};
71127110

7113-
LGraphCanvas.prototype.copyToClipboard = function() {
7111+
LGraphCanvas.prototype.copyToClipboard = function(nodes) {
71147112
var clipboard_info = {
71157113
nodes: [],
71167114
links: []
71177115
};
71187116
var index = 0;
71197117
var selected_nodes_array = [];
7120-
for (var i in this.selected_nodes) {
7121-
var node = this.selected_nodes[i];
7118+
if (!nodes) nodes = this.selected_nodes;
7119+
for (var i in nodes) {
7120+
var node = nodes[i];
71227121
if (node.clonable === false)
71237122
continue;
71247123
node._relative_id = index;
@@ -11702,7 +11701,7 @@ LGraphNode.prototype.executeAction = function(action)
1170211701
default:
1170311702
iS = 0; // try with first if no name set
1170411703
}
11705-
if (typeof options.node_from.outputs[iS] !== undefined){
11704+
if (typeof options.node_from.outputs[iS] !== "undefined"){
1170611705
if (iS!==false && iS>-1){
1170711706
options.node_from.connectByType( iS, node, options.node_from.outputs[iS].type );
1170811707
}
@@ -11730,7 +11729,7 @@ LGraphNode.prototype.executeAction = function(action)
1173011729
default:
1173111730
iS = 0; // try with first if no name set
1173211731
}
11733-
if (typeof options.node_to.inputs[iS] !== undefined){
11732+
if (typeof options.node_to.inputs[iS] !== "undefined"){
1173411733
if (iS!==false && iS>-1){
1173511734
// try connection
1173611735
options.node_to.connectByTypeOutput(iS,node,options.node_to.inputs[iS].type);

0 commit comments

Comments
 (0)