added gcode viewer in macros (maded it editable ),
This commit is contained in:
@@ -72,7 +72,7 @@ module.exports = {
|
|||||||
} else {
|
} else {
|
||||||
const lines = escapeHTML(text.trimRight())
|
const lines = escapeHTML(text.trimRight())
|
||||||
.split(/[\r\n]/)
|
.split(/[\r\n]/)
|
||||||
.map((line, i) => `<li class="ln${i + 1}"><b>${i + 1}</b>${line}</li>`);
|
.map((line, i) => `<li class="ln${i + 1}" contenteditable="true"><b>${i + 1}</b>${line}</li>`);
|
||||||
|
|
||||||
this.clusterize.update(lines);
|
this.clusterize.update(lines);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,22 +39,9 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
load: function () {
|
load: function () {
|
||||||
const file_time = this.state.selected_time;
|
const file_time = this.state.selected_time;
|
||||||
console.log("file_time", file_time);
|
|
||||||
const file = this.state.selected;
|
const file = this.state.selected;
|
||||||
console.log("file: ", file);
|
|
||||||
// console.log("last_file: ", this.last_file);
|
|
||||||
// console.log("last_file_time: ", this.last_file_time);
|
|
||||||
// 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-load", file);
|
||||||
this.$broadcast("gcode-line", this.state.line);
|
this.$broadcast("gcode-line", this.state.line);
|
||||||
// this.toolpath_progress = 0;
|
|
||||||
// this.load_toolpath(file, file_time);
|
|
||||||
},
|
},
|
||||||
upload: function (e) {
|
upload: function (e) {
|
||||||
const files = e.target.files || e.dataTransfer.files;
|
const files = e.target.files || e.dataTransfer.files;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ script#macros-template(type="text/x-template")
|
|||||||
| Upload
|
| Upload
|
||||||
h1 Macros Configuration
|
h1 Macros Configuration
|
||||||
button.pure-button(title="Print config.", @click="resetConfig",
|
button.pure-button(title="Print config.", @click="resetConfig",
|
||||||
style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7") Reset Macros
|
style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7;display:flex;align-items:center;justify-content:space-around") Reset Macros
|
||||||
.fa.fa-rotate-right
|
.fa.fa-rotate-right
|
||||||
.warning-box
|
.warning-box
|
||||||
p
|
p
|
||||||
@@ -44,7 +44,7 @@ script#macros-template(type="text/x-template")
|
|||||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-0")
|
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-0")
|
||||||
p.title G-Code
|
p.title G-Code
|
||||||
select(title="Select previously uploaded GCode programs.",
|
select(title="Select previously uploaded GCode programs.",
|
||||||
v-model="state.selected", @change="load", :disabled="!is_ready",
|
@change="load", :disabled="!is_ready",
|
||||||
style="max-width:100%;height:40px;border-radius:5px")
|
style="max-width:100%;height:40px;border-radius:5px")
|
||||||
option(v-for="file in state.files", :value="file") {{file}}
|
option(v-for="file in state.files", :value="file") {{file}}
|
||||||
|
|
||||||
|
|||||||
@@ -631,7 +631,7 @@ span.unit
|
|||||||
.macros
|
.macros
|
||||||
width 90%
|
width 90%
|
||||||
|
|
||||||
.warning-box
|
.warning-box
|
||||||
display flex
|
display flex
|
||||||
background-color #ced512
|
background-color #ced512
|
||||||
border-radius 5px
|
border-radius 5px
|
||||||
|
|||||||
Reference in New Issue
Block a user