Added color to the "distance" controls.

This commit is contained in:
David Carley
2022-07-11 17:26:18 -07:00
parent de665cac4d
commit dd34b1e988
3 changed files with 9 additions and 7 deletions

1
.gitignore vendored
View File

@@ -25,3 +25,4 @@ __pycache__
.vscode
*.elf
*.hex
null.d

View File

@@ -273,10 +273,11 @@ module.exports = {
this.send('G90\nG0' + xcmd + ycmd + zcmd + acmd + '\n');
},
getJogIncrFontWeight(value) {
const weight = this.jog_incr === value ? 'bold' : 'normal';
getJogIncrStyle(value) {
const weight = `font-weight:${this.jog_incr === value ? 'bold' : 'normal'}`;
const color = this.jog_incr === value ? "color:#0078e7" : "";
return `font-weight:${weight}`;
return [weight, color].join(';');
},
jog_fn: function (x_jog, y_jog, z_jog, a_jog) {

View File

@@ -79,16 +79,16 @@ script#control-view-template(type="text/x-template")
button(@click="jog_fn(0,0,-1,0)") Z-
tr
td(style="height:100px",align="center")
button(:style="getJogIncrFontWeight('fine')", @click="jog_incr = 'fine'")
button(:style="getJogIncrStyle('fine')", @click="jog_incr = 'fine'")
span {{jog_incr_amounts[display_units].fine}}#[span.jog-units {{metric ? 'mm' : 'in'}}]
td(style="height:100px",align="center")
button(:style="getJogIncrFontWeight('small')", @click="jog_incr = 'small'")
button(:style="getJogIncrStyle('small')", @click="jog_incr = 'small'")
span {{jog_incr_amounts[display_units].small}}#[span.jog-units {{metric ? 'mm' : 'in'}}]
td(style="height:100px",align="center")
button(:style="getJogIncrFontWeight('medium')", @click="jog_incr = 'medium'")
button(:style="getJogIncrStyle('medium')", @click="jog_incr = 'medium'")
span {{jog_incr_amounts[display_units].medium}}#[span.jog-units {{metric ? 'mm' : 'in'}}]
td(style="height:100px",align="center")
button(:style="getJogIncrFontWeight('large')", @click="jog_incr = 'large'")
button(:style="getJogIncrStyle('large')", @click="jog_incr = 'large'")
span {{jog_incr_amounts[display_units].large}}#[span.jog-units {{metric ? 'mm' : 'in'}}]
tr
td(style="height:100px", align="center", colspan="2")