add ability to selecively disable ops
This commit is contained in:
parent
77ff79feb5
commit
e19c27170a
4 changed files with 19 additions and 2 deletions
|
|
@ -290,6 +290,9 @@
|
|||
func.opDel(rec);
|
||||
};
|
||||
let el = $(id);
|
||||
if (rec.disabled) {
|
||||
el.classList.add("disabled");
|
||||
}
|
||||
bounds.push(el);
|
||||
let timer = null;
|
||||
let inside = true;
|
||||
|
|
@ -331,6 +334,17 @@
|
|||
if (!clist.contains("draggable")) {
|
||||
return;
|
||||
}
|
||||
if (ev.ctrlKey || ev.metaKey) {
|
||||
rec.disabled = !rec.disabled;
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
if (rec.disabled) {
|
||||
clist.add("disabled");
|
||||
} else {
|
||||
clist.remove("disabled");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
clist.add("drag");
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
|
|
|
|||
Loading…
Reference in a new issue