mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-04 21:22:07 +00:00
Untabify
This commit is contained in:
@@ -7109,8 +7109,8 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
var selected_nodes_array = [];
|
var selected_nodes_array = [];
|
||||||
for (var i in this.selected_nodes) {
|
for (var i in this.selected_nodes) {
|
||||||
var node = this.selected_nodes[i];
|
var node = this.selected_nodes[i];
|
||||||
if (node.clonable === false)
|
if (node.clonable === false)
|
||||||
continue;
|
continue;
|
||||||
node._relative_id = index;
|
node._relative_id = index;
|
||||||
selected_nodes_array.push(node);
|
selected_nodes_array.push(node);
|
||||||
index += 1;
|
index += 1;
|
||||||
@@ -7118,12 +7118,12 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
|
|
||||||
for (var i = 0; i < selected_nodes_array.length; ++i) {
|
for (var i = 0; i < selected_nodes_array.length; ++i) {
|
||||||
var node = selected_nodes_array[i];
|
var node = selected_nodes_array[i];
|
||||||
var cloned = node.clone();
|
var cloned = node.clone();
|
||||||
if(!cloned)
|
if(!cloned)
|
||||||
{
|
{
|
||||||
console.warn("node type not found: " + node.type );
|
console.warn("node type not found: " + node.type );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
clipboard_info.nodes.push(cloned.serialize());
|
clipboard_info.nodes.push(cloned.serialize());
|
||||||
if (node.inputs && node.inputs.length) {
|
if (node.inputs && node.inputs.length) {
|
||||||
for (var j = 0; j < node.inputs.length; ++j) {
|
for (var j = 0; j < node.inputs.length; ++j) {
|
||||||
|
|||||||
@@ -341,20 +341,20 @@
|
|||||||
|
|
||||||
// Reconnect links
|
// Reconnect links
|
||||||
for (const node of graph.nodes) {
|
for (const node of graph.nodes) {
|
||||||
if (node.inputs) {
|
if (node.inputs) {
|
||||||
for (const input of node.inputs) {
|
for (const input of node.inputs) {
|
||||||
if (input.link) {
|
if (input.link) {
|
||||||
input.link = idMap.linkIDs[input.link]
|
input.link = idMap.linkIDs[input.link]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (node.outputs) {
|
if (node.outputs) {
|
||||||
for (const output of node.outputs) {
|
for (const output of node.outputs) {
|
||||||
if (output.links) {
|
if (output.links) {
|
||||||
output.links = output.links.map(l => idMap.linkIDs[l]);
|
output.links = output.links.map(l => idMap.linkIDs[l]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recurse!
|
// Recurse!
|
||||||
|
|||||||
Reference in New Issue
Block a user