mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-20 14:54:12 +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 = {
|
||||
nodes: [],
|
||||
links: []
|
||||
};
|
||||
var index = 0;
|
||||
var selected_nodes_array = [];
|
||||
for (var i in this.selected_nodes) {
|
||||
var node = this.selected_nodes[i];
|
||||
if (!nodes) nodes = this.selected_nodes;
|
||||
for (var i in nodes) {
|
||||
var node = nodes[i];
|
||||
if (node.clonable === false)
|
||||
continue;
|
||||
node._relative_id = index;
|
||||
|
||||
Reference in New Issue
Block a user