hide spindle speed when not applicable. rename some cam ops vars
This commit is contained in:
parent
23e927e0d4
commit
1d2cdc9a15
6 changed files with 106 additions and 89 deletions
|
|
@ -305,7 +305,7 @@
|
|||
}
|
||||
|
||||
function addModeControls(el, options) {
|
||||
options = options || {};
|
||||
let opt = options || {};
|
||||
el.__show = true;
|
||||
el.__modeSave = null;
|
||||
el.showMe = function() {
|
||||
|
|
@ -325,16 +325,17 @@
|
|||
else el.hideMe();
|
||||
};
|
||||
el.setMode = function(mode) {
|
||||
let show = options.expert === undefined || (options.expert === letExpert);
|
||||
el.setVisible(el.hasMode(mode) && show);
|
||||
let show = opt.expert === undefined || (opt.expert === letExpert);
|
||||
let disp = opt.visible ? opt.visible() : true;
|
||||
el.setVisible(el.hasMode(mode) && show && disp);
|
||||
}
|
||||
el.hasMode = function(mode) {
|
||||
if (mode === NOMODE) return false;
|
||||
if (!el.modes) return true;
|
||||
return el.modes.contains(mode);
|
||||
}
|
||||
if (options.modes) {
|
||||
el.modes = options.modes;
|
||||
if (opt.modes) {
|
||||
el.modes = opt.modes;
|
||||
hasModes.push(el);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue