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:
parent
1850185d1e
commit
dbaacc411a
@ -601,7 +601,7 @@ RED.view = (function() {
|
|||||||
updateSelection();
|
updateSelection();
|
||||||
lasso.remove();
|
lasso.remove();
|
||||||
lasso = null;
|
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();
|
clearSelection();
|
||||||
updateSelection();
|
updateSelection();
|
||||||
}
|
}
|
||||||
@ -1001,10 +1001,10 @@ RED.view = (function() {
|
|||||||
|
|
||||||
var i;
|
var i;
|
||||||
|
|
||||||
if (d.selected && d3.event.ctrlKey) {
|
if (d.selected && (d3.event.ctrlKey||d3.event.metaKey)) {
|
||||||
d.selected = false;
|
mousedown_node.selected = false;
|
||||||
for (i=0;i<moving_set.length;i+=1) {
|
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);
|
moving_set.splice(i,1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1019,7 +1019,7 @@ RED.view = (function() {
|
|||||||
moving_set.push({n:cnodes[n]});
|
moving_set.push({n:cnodes[n]});
|
||||||
}
|
}
|
||||||
} else if (!d.selected) {
|
} else if (!d.selected) {
|
||||||
if (!d3.event.ctrlKey) {
|
if (!d3.event.ctrlKey && !d3.event.metaKey) {
|
||||||
clearSelection();
|
clearSelection();
|
||||||
}
|
}
|
||||||
mousedown_node.selected = true;
|
mousedown_node.selected = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user