mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 23:39:45 +00:00
Merge pull request #73 from NateScarlet/delete-selected
Reset `current_node` after node deletion
This commit is contained in:
35595
build/litegraph.js
35595
build/litegraph.js
File diff suppressed because it is too large
Load Diff
8
build/litegraph.min.js
vendored
8
build/litegraph.min.js
vendored
@@ -2641,6 +2641,7 @@ $jscomp.polyfill("Array.prototype.keys", function(w) {
|
||||
}
|
||||
}
|
||||
this.selected_nodes = {};
|
||||
this.current_node = null;
|
||||
this.highlighted_links = {};
|
||||
this.setDirty(!0);
|
||||
}
|
||||
@@ -2650,6 +2651,7 @@ $jscomp.polyfill("Array.prototype.keys", function(w) {
|
||||
this.graph.remove(this.selected_nodes[a]);
|
||||
}
|
||||
this.selected_nodes = {};
|
||||
this.current_node = null;
|
||||
this.highlighted_links = {};
|
||||
this.setDirty(!0);
|
||||
};
|
||||
@@ -4152,7 +4154,7 @@ $jscomp.polyfill("Array.prototype.keys", function(w) {
|
||||
}
|
||||
};
|
||||
c.getParameterNames = function(a) {
|
||||
return (a + "").replace(/[/][/].*$/mg, "").replace(/\s+/g, "").replace(/[/][*][^/*]*[*][/]/g, "").split("){", 1)[0].replace(/^[^(]*[(]/, "").replace(/=[^,]+/g, "").split(",").filter(Boolean);
|
||||
return (a + "").replace(/[/][/].*$/gm, "").replace(/\s+/g, "").replace(/[/][*][^/*]*[*][/]/g, "").split("){", 1)[0].replace(/^[^(]*[(]/, "").replace(/=[^,]+/g, "").split(",").filter(Boolean);
|
||||
};
|
||||
Math.clamp = function(a, b, d) {
|
||||
return b > a ? b : d < a ? d : a;
|
||||
@@ -6220,7 +6222,7 @@ $jscomp.polyfill("Array.prototype.keys", function(w) {
|
||||
}, k = function() {
|
||||
this.addInput("in", "Texture");
|
||||
this.addOutput("out", "Texture");
|
||||
this.properties = {key_color:vec3.fromValues(0., 1., 0.), threshold:0.8, slope:0.2, precision:u.DEFAULT};
|
||||
this.properties = {key_color:vec3.fromValues(0, 1, 0), threshold:0.8, slope:0.2, precision:u.DEFAULT};
|
||||
}, h = function() {
|
||||
this.addOutput("out", "Texture");
|
||||
this.properties = {code:"", width:512, height:512, precision:u.DEFAULT};
|
||||
@@ -6406,7 +6408,7 @@ $jscomp.polyfill("Array.prototype.keys", function(w) {
|
||||
u.HIGH = 4;
|
||||
u.REUSE = 5;
|
||||
u.DEFAULT = 2;
|
||||
u.MODE_VALUES = {"pass through":u.PASS_THROUGH, copy:u.COPY, low:u.LOW, high:u.HIGH, reuse:u.REUSE, "default":u.DEFAULT};
|
||||
u.MODE_VALUES = {"pass through":u.PASS_THROUGH, copy:u.COPY, low:u.LOW, high:u.HIGH, reuse:u.REUSE, default:u.DEFAULT};
|
||||
u.getTexturesContainer = function() {
|
||||
return gl.textures;
|
||||
};
|
||||
|
||||
@@ -1473,7 +1473,8 @@
|
||||
|
||||
//pack link info into a non-verbose format
|
||||
var links = [];
|
||||
for (var i in this.links) { //links is an OBJECT
|
||||
for (var i in this.links) {
|
||||
//links is an OBJECT
|
||||
var link = this.links[i];
|
||||
links.push([
|
||||
link.id,
|
||||
@@ -5219,6 +5220,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
node.is_selected = false;
|
||||
}
|
||||
this.selected_nodes = {};
|
||||
this.current_node = null;
|
||||
this.highlighted_links = {};
|
||||
this.setDirty(true);
|
||||
};
|
||||
@@ -5234,6 +5236,7 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
this.graph.remove(m);
|
||||
}
|
||||
this.selected_nodes = {};
|
||||
this.current_node = null;
|
||||
this.highlighted_links = {};
|
||||
this.setDirty(true);
|
||||
};
|
||||
@@ -9122,14 +9125,16 @@ LGraphNode.prototype.executeAction = function(action)
|
||||
};
|
||||
|
||||
LiteGraph.extendClass = function(target, origin) {
|
||||
for (var i in origin) { //copy class properties
|
||||
for (var i in origin) {
|
||||
//copy class properties
|
||||
if (target.hasOwnProperty(i)) continue;
|
||||
target[i] = origin[i];
|
||||
}
|
||||
|
||||
if (origin.prototype)
|
||||
//copy prototype properties
|
||||
for (var i in origin.prototype) { //only enumerable
|
||||
for (var i in origin.prototype) {
|
||||
//only enumerable
|
||||
if (!origin.prototype.hasOwnProperty(i)) continue;
|
||||
|
||||
if (target.prototype.hasOwnProperty(i))
|
||||
|
||||
Reference in New Issue
Block a user