created tabs for macros and buttons in control-view
This commit is contained in:
@@ -202,8 +202,8 @@ module.exports = {
|
||||
const p = this.plan_time / this.toolpath.time;
|
||||
return Math.min(1, p);
|
||||
},
|
||||
isMacrosPresent: function(){
|
||||
return this.config.macros!=undefined;
|
||||
isMacrosPresent: function(val){
|
||||
return this.config.macros[val].name=null;
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = {
|
||||
|
||||
data: function (){
|
||||
return {
|
||||
toolpath_progress: 0,
|
||||
tab: "1",
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -81,16 +81,16 @@ module.exports = {
|
||||
}
|
||||
});
|
||||
},
|
||||
saveMacros: async function(){
|
||||
saveMacros: async function(id){
|
||||
var macrosName = document.getElementById("macros-name").value;
|
||||
var macrosColor = document.getElementById("macros-color").value;
|
||||
if(this.config.macros == undefined) {
|
||||
console.log("macros is undefined");
|
||||
this.config.macros=[];
|
||||
}else{
|
||||
this.config.macros[0].name=macrosName;
|
||||
this.config.macros[0].color=macrosColor;
|
||||
this.config.macros[0].gcode=this.state.selected;
|
||||
this.config.macros[id].name=macrosName;
|
||||
this.config.macros[id].color=macrosColor;
|
||||
this.config.macros[id].gcode=this.state.selected;
|
||||
}
|
||||
console.log(this.config.macros);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user