diff --git a/src/js/control-view.js b/src/js/control-view.js index c48b0b2..464bdd7 100644 --- a/src/js/control-view.js +++ b/src/js/control-view.js @@ -203,7 +203,7 @@ module.exports = { return Math.min(1, p); }, isMacrosPresent: function(){ - return this.config.macros==undefined; + return this.config.macros!=undefined; }, }, diff --git a/src/js/macros.js b/src/js/macros.js index 2b050c6..128308d 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -34,24 +34,23 @@ module.exports = { methods:{ open: function() { utils.clickFileInput("gcode-file-input"); - console.log("utils done"); }, load: function() { const file_time = this.state.selected_time; console.log('file_time',this.state.selected_time); const file = this.state.selected; console.log("file: ",this.state.selected); - if (this.last_file == file && this.last_file_time == file_time) { - return; - } + // if (this.last_file == file && this.last_file_time == file_time) { + // return; + // } - this.last_file = file; - this.last_file_time = file_time; + // 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); + // this.$broadcast("gcode-load", file); + // this.$broadcast("gcode-line", this.state.line); + // this.toolpath_progress = 0; + // this.load_toolpath(file, file_time); }, upload: function(e) { const files = e.target.files || e.dataTransfer.files;