mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Allow copy-to-clipboard copy whole tabs
This commit is contained in:
parent
dc880c672a
commit
1c66c88f95
@ -1471,10 +1471,24 @@ RED.view = (function() {
|
||||
}
|
||||
|
||||
function copySelection() {
|
||||
if (moving_set.length > 0) {
|
||||
var nodes = [];
|
||||
var selection = RED.workspaces.selection();
|
||||
if (selection.length > 0) {
|
||||
nodes = [];
|
||||
selection.forEach(function(n) {
|
||||
if (n.type === 'tab') {
|
||||
nodes.push(n);
|
||||
nodes = nodes.concat(RED.nodes.filterNodes({z:n.id}));
|
||||
}
|
||||
});
|
||||
} else if (moving_set.length > 0) {
|
||||
nodes = moving_set.map(function(n) { return n.n });
|
||||
}
|
||||
|
||||
if (nodes.length > 0) {
|
||||
var nns = [];
|
||||
for (var n=0;n<moving_set.length;n++) {
|
||||
var node = moving_set[n].n;
|
||||
for (var n=0;n<nodes.length;n++) {
|
||||
var node = nodes[n];
|
||||
// The only time a node.type == subflow can be selected is the
|
||||
// input/output "proxy" nodes. They cannot be copied.
|
||||
if (node.type != "subflow") {
|
||||
|
Loading…
Reference in New Issue
Block a user