undone the :disabled checked while pressing the button
This commit is contained in:
@@ -165,10 +165,6 @@ module.exports = {
|
|||||||
// return this.is_idle || this.is_paused;
|
// return this.is_idle || this.is_paused;
|
||||||
},
|
},
|
||||||
|
|
||||||
can_load_origin: function (axis) {
|
|
||||||
return this.is_idle && this.state["offset_" + axis] == 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
message: function () {
|
message: function () {
|
||||||
if (this.mach_state == "ESTOPPED") {
|
if (this.mach_state == "ESTOPPED") {
|
||||||
return this.state.er;
|
return this.state.er;
|
||||||
@@ -786,7 +782,7 @@ module.exports = {
|
|||||||
load_position: function (axes) {
|
load_position: function (axes) {
|
||||||
try {
|
try {
|
||||||
for (const axis of axes) {
|
for (const axis of axes) {
|
||||||
if (this.config.axes["offset_" + axis]) {
|
if (this.config.axes["offset_" + axis] && this.state["offset_" + axis] == 0) {
|
||||||
this.set_position(axis, -this.config.axes["offset_" + axis]);
|
this.set_position(axis, -this.config.axes["offset_" + axis]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ script#control-view-template(type="text/x-template")
|
|||||||
title=`Home {{'${axis}' | upper}} axis.`, style="height:60px;width:60px")
|
title=`Home {{'${axis}' | upper}} axis.`, style="height:60px;width:60px")
|
||||||
.fa.fa-home
|
.fa.fa-home
|
||||||
|
|
||||||
button.pure-button(:disabled="!can_load_origin", @click=`load_position('${axis}')`,
|
button.pure-button(:disabled="!can_set_axis", @click=`load_position('${axis}')`,
|
||||||
title=`Load {{'${axis}' | upper}} origin.`, style="height:60px;width:60px")
|
title=`Load {{'${axis}' | upper}} origin.`, style="height:60px;width:60px")
|
||||||
.fa.fa-map-pin
|
.fa.fa-map-pin
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user