Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
allow nodes to be specified when copying (#3)
  • Loading branch information
pythongosssss authored and comfyanonymous committed Dec 21, 2023
commit f71e6f3106455c41913f93e191a7ac5417f83079
7 changes: 4 additions & 3 deletions src/litegraph.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down