1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Handle OSX Meta key when selecting nodes

This commit is contained in:
Nick O'Leary 2016-01-07 15:09:14 +00:00
parent 1850185d1e
commit dbaacc411a

View File

@ -601,7 +601,7 @@ RED.view = (function() {
updateSelection();
lasso.remove();
lasso = null;
} else if (mouse_mode == RED.state.DEFAULT && mousedown_link == null && !d3.event.ctrlKey ) {
} else if (mouse_mode == RED.state.DEFAULT && mousedown_link == null && !d3.event.ctrlKey&& !d3.event.metaKey ) {
clearSelection();
updateSelection();
}
@ -1001,10 +1001,10 @@ RED.view = (function() {
var i;
if (d.selected && d3.event.ctrlKey) {
d.selected = false;
if (d.selected && (d3.event.ctrlKey||d3.event.metaKey)) {
mousedown_node.selected = false;
for (i=0;i<moving_set.length;i+=1) {
if (moving_set[i].n === d) {
if (moving_set[i].n === mousedown_node) {
moving_set.splice(i,1);
break;
}
@ -1019,7 +1019,7 @@ RED.view = (function() {
moving_set.push({n:cnodes[n]});
}
} else if (!d.selected) {
if (!d3.event.ctrlKey) {
if (!d3.event.ctrlKey && !d3.event.metaKey) {
clearSelection();
}
mousedown_node.selected = true;