mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Disable copy/paste and enable select-all in node-select mode
This commit is contained in:
parent
502a8112b5
commit
20cba6411b
@ -1388,14 +1388,19 @@ RED.view = (function() {
|
|||||||
function selectAll() {
|
function selectAll() {
|
||||||
RED.nodes.eachNode(function(n) {
|
RED.nodes.eachNode(function(n) {
|
||||||
if (n.z == RED.workspaces.active()) {
|
if (n.z == RED.workspaces.active()) {
|
||||||
|
if (mouse_mode === RED.state.SELECTING_NODE) {
|
||||||
|
if (selectNodesOptions.filter && !selectNodesOptions.filter(n)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!n.selected) {
|
if (!n.selected) {
|
||||||
n.selected = true;
|
n.selected = true;
|
||||||
n.dirty = true;
|
n.dirty = true;
|
||||||
moving_set.push({n:n});
|
moving_set.push({n:n});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
if (activeSubflow) {
|
if (mouse_mode !== RED.state.SELECTING_NODE && activeSubflow) {
|
||||||
activeSubflow.in.forEach(function(n) {
|
activeSubflow.in.forEach(function(n) {
|
||||||
if (!n.selected) {
|
if (!n.selected) {
|
||||||
n.selected = true;
|
n.selected = true;
|
||||||
@ -1420,7 +1425,9 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
selected_link = null;
|
selected_link = null;
|
||||||
|
if (mouse_mode !== RED.state.SELECTING_NODE) {
|
||||||
updateSelection();
|
updateSelection();
|
||||||
|
}
|
||||||
redraw();
|
redraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1554,6 +1561,9 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function deleteSelection() {
|
function deleteSelection() {
|
||||||
|
if (mouse_mode === RED.state.SELECTING_NODE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (portLabelHover) {
|
if (portLabelHover) {
|
||||||
portLabelHover.remove();
|
portLabelHover.remove();
|
||||||
portLabelHover = null;
|
portLabelHover = null;
|
||||||
@ -1730,6 +1740,9 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function copySelection() {
|
function copySelection() {
|
||||||
|
if (mouse_mode === RED.state.SELECTING_NODE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var nodes = [];
|
var nodes = [];
|
||||||
var selection = RED.workspaces.selection();
|
var selection = RED.workspaces.selection();
|
||||||
if (selection.length > 0) {
|
if (selection.length > 0) {
|
||||||
@ -3378,6 +3391,9 @@ RED.view = (function() {
|
|||||||
* - attached to mouse for placing - "IMPORT_DRAGGING"
|
* - attached to mouse for placing - "IMPORT_DRAGGING"
|
||||||
*/
|
*/
|
||||||
function importNodes(newNodesStr,addNewFlow,touchImport) {
|
function importNodes(newNodesStr,addNewFlow,touchImport) {
|
||||||
|
if (mouse_mode === RED.state.SELECTING_NODE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
var activeSubflowChanged;
|
var activeSubflowChanged;
|
||||||
if (activeSubflow) {
|
if (activeSubflow) {
|
||||||
|
Loading…
Reference in New Issue
Block a user