add shift modified for toggling ops on/off that adds a global shift
This commit is contained in:
parent
3f2e9e3c19
commit
ab537e5993
1 changed files with 12 additions and 5 deletions
|
|
@ -376,13 +376,20 @@ CAM.init = function(kiri, api) {
|
|||
return;
|
||||
}
|
||||
if (ev.ctrlKey || ev.metaKey) {
|
||||
rec.disabled = !rec.disabled;
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
if (rec.disabled) {
|
||||
clist.add("disabled");
|
||||
} else {
|
||||
clist.remove("disabled");
|
||||
rec.disabled = !rec.disabled;
|
||||
for (let op of ev.shiftKey ? oplist : [ rec ]) {
|
||||
if (op !== rec) {
|
||||
op.disabled = !rec.disabled;
|
||||
}
|
||||
}
|
||||
for (let el of bounds) {
|
||||
if (el.rec.disabled) {
|
||||
el.classList.add("disabled");
|
||||
} else {
|
||||
el.classList.remove("disabled");
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue