add shift + click to duplicate an CAM op
This commit is contained in:
parent
8c32b1ba5a
commit
e9da615dc7
1 changed files with 11 additions and 0 deletions
|
|
@ -571,6 +571,7 @@ CAM.init = function(kiri, api) {
|
|||
if (!clist.contains("draggable")) {
|
||||
return;
|
||||
}
|
||||
// toggle enable / disable
|
||||
if (!clock && (ev.ctrlKey || ev.metaKey)) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
|
|
@ -589,6 +590,16 @@ CAM.init = function(kiri, api) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
// duplicate op
|
||||
if (!clock && ev.shiftKey) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
oplist = current.process.ops;
|
||||
oplist.push(Object.clone(rec));
|
||||
API.conf.save();
|
||||
func.opRender();
|
||||
return true;
|
||||
}
|
||||
clist.add("drag");
|
||||
ev.stopPropagation();
|
||||
ev.preventDefault();
|
||||
|
|
|
|||
Loading…
Reference in a new issue