Rebuilt the "Move to [XY|Z] zero?" dialogs in Svelte.
This commit is contained in:
@@ -48,8 +48,6 @@ module.exports = {
|
||||
c: false
|
||||
},
|
||||
ask_home: true,
|
||||
ask_zero_xy_msg: false,
|
||||
ask_zero_z_msg: false,
|
||||
showGcodeMessage: false
|
||||
}
|
||||
},
|
||||
@@ -244,7 +242,6 @@ module.exports = {
|
||||
SvelteComponents.registerControllerMethods({
|
||||
stop: (...args) => this.stop(...args),
|
||||
send: (...args) => this.send(...args),
|
||||
goto_zero: (...args) => this.goto_zero(...args),
|
||||
isAxisHomed: (axis) => this[axis].homed,
|
||||
unhome: (...args) => this.unhome(...args),
|
||||
set_position: (...args) => this.set_position(...args),
|
||||
@@ -253,18 +250,6 @@ module.exports = {
|
||||
},
|
||||
|
||||
methods: {
|
||||
goto_zero(zero_x, zero_y, zero_z, zero_a) {
|
||||
const xcmd = zero_x ? "X0" : "";
|
||||
const ycmd = zero_y ? "Y0" : "";
|
||||
const zcmd = zero_z ? "Z0" : "";
|
||||
const acmd = zero_a ? "A0" : "";
|
||||
|
||||
this.ask_zero_xy_msg = false;
|
||||
this.ask_zero_z_msg = false;
|
||||
|
||||
this.send('G90\nG0' + xcmd + ycmd + zcmd + acmd + '\n');
|
||||
},
|
||||
|
||||
getJogIncrStyle(value) {
|
||||
const weight = `font-weight:${this.jog_incr === value ? 'bold' : 'normal'}`;
|
||||
const color = this.jog_incr === value ? "color:#0078e7" : "";
|
||||
|
||||
Reference in New Issue
Block a user