Testing Macros
This commit is contained in:
@@ -1,5 +1,51 @@
|
||||
"use strict";
|
||||
|
||||
const utils = require("./utils");
|
||||
|
||||
module.exports = {
|
||||
template: "#macros-template",
|
||||
props: [ "config", "template", "state" ],
|
||||
|
||||
data: function (){
|
||||
return {
|
||||
no_of_macros : 0,
|
||||
toolpath_progress: 0,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"axis-control": require("./axis-control"),
|
||||
"path-viewer": require("./path-viewer"),
|
||||
"gcode-viewer": require("./gcode-viewer")
|
||||
},
|
||||
computed:{
|
||||
is_ready: function() {
|
||||
return this.mach_state == "READY";
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
print: function(){
|
||||
console.log(this.state);
|
||||
},
|
||||
open: function() {
|
||||
utils.clickFileInput("gcode-file-input");
|
||||
},
|
||||
getMacrosList : function (){
|
||||
return no_of_macros;
|
||||
},
|
||||
load: function() {
|
||||
const file_time = this.state.selected_time;
|
||||
const file = this.state.selected;
|
||||
if (this.last_file == file && this.last_file_time == file_time) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.last_file = file;
|
||||
this.last_file_time = file_time;
|
||||
|
||||
this.$broadcast("gcode-load", file);
|
||||
this.$broadcast("gcode-line", this.state.line);
|
||||
this.toolpath_progress = 0;
|
||||
this.load_toolpath(file, file_time);
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user