added gcode viewer in macros (maded it editable ),
This commit is contained in:
@@ -72,7 +72,7 @@ module.exports = {
|
||||
} else {
|
||||
const lines = escapeHTML(text.trimRight())
|
||||
.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);
|
||||
}
|
||||
|
||||
@@ -39,22 +39,9 @@ module.exports = {
|
||||
},
|
||||
load: function () {
|
||||
const file_time = this.state.selected_time;
|
||||
console.log("file_time", file_time);
|
||||
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-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;
|
||||
|
||||
@@ -11,12 +11,12 @@ script#macros-template(type="text/x-template")
|
||||
| Upload
|
||||
h1 Macros Configuration
|
||||
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
|
||||
.warning-box
|
||||
p
|
||||
u Note:
|
||||
| Reset the macros to default macros recommended by Onefinity CNC.
|
||||
u Note:
|
||||
| Reset the macros to default macros recommended by Onefinity CNC.
|
||||
.tabs
|
||||
input#tab1(type="radio", name="tabs",checked="" @click="tab = '1'")
|
||||
label(for="tab1",style="height:50px;width:100px") Macros 1
|
||||
@@ -44,7 +44,7 @@ script#macros-template(type="text/x-template")
|
||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-0")
|
||||
p.title G-Code
|
||||
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")
|
||||
option(v-for="file in state.files", :value="file") {{file}}
|
||||
|
||||
|
||||
@@ -631,16 +631,16 @@ span.unit
|
||||
.macros
|
||||
width 90%
|
||||
|
||||
.warning-box
|
||||
display flex
|
||||
background-color #ced512
|
||||
border-radius 5px
|
||||
border 0
|
||||
padding 4px
|
||||
margin-top 5px
|
||||
margin-bottom 10px
|
||||
margin-top 10px
|
||||
align-items center
|
||||
.warning-box
|
||||
display flex
|
||||
background-color #ced512
|
||||
border-radius 5px
|
||||
border 0
|
||||
padding 4px
|
||||
margin-top 5px
|
||||
margin-bottom 10px
|
||||
margin-top 10px
|
||||
align-items center
|
||||
|
||||
.tabs
|
||||
margin-top 5px
|
||||
|
||||
Reference in New Issue
Block a user