toggle ops adders based on device state
This commit is contained in:
parent
d0ae4b63f7
commit
cd42021e42
2 changed files with 26 additions and 0 deletions
|
|
@ -190,6 +190,8 @@ CAM.init = function(kiri, api) {
|
|||
let settings = API.conf.get();
|
||||
let { process, device } = settings;
|
||||
switch (ev.target.innerText) {
|
||||
case "laser on": return func.opAddLaserOn();
|
||||
case "laser off": return func.opAddLaserOff();
|
||||
case "gcode": return func.opAddGCode();
|
||||
case "level": return func.opAddLevel();
|
||||
case "rough": return func.opAddRough();
|
||||
|
|
@ -217,6 +219,14 @@ CAM.init = function(kiri, api) {
|
|||
}
|
||||
};
|
||||
|
||||
func.opAddLaserOn = () => {
|
||||
func.opAdd(popOp['laser on'].new());
|
||||
};
|
||||
|
||||
func.opAddLaserOff = () => {
|
||||
func.opAdd(popOp['laser off'].new());
|
||||
};
|
||||
|
||||
func.opAddGCode = () => {
|
||||
func.opAdd(popOp.gcode.new());
|
||||
};
|
||||
|
|
@ -1249,6 +1259,14 @@ CAM.init = function(kiri, api) {
|
|||
UC.newButton(LANG.cf_menu, func.opFlip)
|
||||
], {class:"ext-buttons f-row"})
|
||||
};
|
||||
|
||||
createPopOp('laser on', {
|
||||
}).inputs = {
|
||||
};
|
||||
|
||||
createPopOp('laser off', {
|
||||
}).inputs = {
|
||||
};
|
||||
};
|
||||
|
||||
function createPopOp(type, map) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue