mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 11:11:53 +00:00
allow nodes to be specified when copying (#3)
This commit is contained in:
committed by
comfyanonymous
parent
3a3a51cfcd
commit
f71e6f3106
@@ -7132,15 +7132,16 @@ LGraphNode.prototype.executeAction = function(action)
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
LGraphCanvas.prototype.copyToClipboard = function() {
|
LGraphCanvas.prototype.copyToClipboard = function(nodes) {
|
||||||
var clipboard_info = {
|
var clipboard_info = {
|
||||||
nodes: [],
|
nodes: [],
|
||||||
links: []
|
links: []
|
||||||
};
|
};
|
||||||
var index = 0;
|
var index = 0;
|
||||||
var selected_nodes_array = [];
|
var selected_nodes_array = [];
|
||||||
for (var i in this.selected_nodes) {
|
if (!nodes) nodes = this.selected_nodes;
|
||||||
var node = this.selected_nodes[i];
|
for (var i in nodes) {
|
||||||
|
var node = nodes[i];
|
||||||
if (node.clonable === false)
|
if (node.clonable === false)
|
||||||
continue;
|
continue;
|
||||||
node._relative_id = index;
|
node._relative_id = index;
|
||||||
|
|||||||
Reference in New Issue
Block a user