Loading src/components/paneNavigate.vue +12 −11 Original line number Diff line number Diff line Loading @@ -117,7 +117,8 @@ export default { stepXy: 200, stepZz: 50, setPosition: this.$store.state.apiState.stage.position, isAutofocusing: false isAutofocusing: false, moveLock: false } }, Loading Loading @@ -190,9 +191,9 @@ export default { moveRequest: function(x, y, z, absolute) { // If not movement-locked if (!this.$store.state.moveLock) { if (!this.moveLock) { // Lock move requests this.$store.commit('changeMoveLock', true) this.moveLock = true // Send move request axios.post(this.positionApiUri, { Loading @@ -209,15 +210,15 @@ export default { this.modalError(error) // Let mixin handle error }) .then(() => { this.$store.commit('changeMoveLock', false) // Release the move lock this.moveLock = false // Release the move lock }) } }, runAutofocus: function(dz) { if (!this.$store.state.moveLock) { if (!this.moveLock) { // Lock move requests this.$store.commit('changeMoveLock', true); this.moveLock = true this.isAutofocusing = true axios.post(this.autofocusApiUri, {dz: dz}) .then(response => { Loading @@ -234,15 +235,15 @@ export default { .finally(() => { console.log("Cleaning up after autofocus.") this.isAutofocusing = false; this.$store.commit('changeMoveLock', false); // Release the move lock this.moveLock = false // Release the move lock }) } }, runFastAutofocus: function(dz, backlash) { if (!this.$store.state.moveLock) { if (!this.moveLock) { // Lock move requests this.$store.commit('changeMoveLock', true); this.moveLock = true this.isAutofocusing = true axios.post(this.fastAutofocusApiUri, {dz: dz, backlash: backlash}) .then(response => { Loading @@ -258,8 +259,8 @@ export default { }) .finally(() => { console.log("Cleaning up after autofocus.") this.isAutofocusing = false; this.$store.commit('changeMoveLock', false); // Release the move lock this.isAutofocusing = false this.moveLock = false // Release the move lock }) } } Loading src/store.js +0 −4 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ export default new Vuex.Store({ error: '', apiConfig: {}, apiState: {}, moveLock: false, settings: { disableStream: false, autoGpuPreview: false, Loading @@ -35,9 +34,6 @@ export default new Vuex.Store({ changeWaiting(state, waiting) { state.waiting = waiting }, changeMoveLock(state, lock) { state.moveLock = lock }, commitError(state, errorString) { state.error = errorString; }, Loading Loading
src/components/paneNavigate.vue +12 −11 Original line number Diff line number Diff line Loading @@ -117,7 +117,8 @@ export default { stepXy: 200, stepZz: 50, setPosition: this.$store.state.apiState.stage.position, isAutofocusing: false isAutofocusing: false, moveLock: false } }, Loading Loading @@ -190,9 +191,9 @@ export default { moveRequest: function(x, y, z, absolute) { // If not movement-locked if (!this.$store.state.moveLock) { if (!this.moveLock) { // Lock move requests this.$store.commit('changeMoveLock', true) this.moveLock = true // Send move request axios.post(this.positionApiUri, { Loading @@ -209,15 +210,15 @@ export default { this.modalError(error) // Let mixin handle error }) .then(() => { this.$store.commit('changeMoveLock', false) // Release the move lock this.moveLock = false // Release the move lock }) } }, runAutofocus: function(dz) { if (!this.$store.state.moveLock) { if (!this.moveLock) { // Lock move requests this.$store.commit('changeMoveLock', true); this.moveLock = true this.isAutofocusing = true axios.post(this.autofocusApiUri, {dz: dz}) .then(response => { Loading @@ -234,15 +235,15 @@ export default { .finally(() => { console.log("Cleaning up after autofocus.") this.isAutofocusing = false; this.$store.commit('changeMoveLock', false); // Release the move lock this.moveLock = false // Release the move lock }) } }, runFastAutofocus: function(dz, backlash) { if (!this.$store.state.moveLock) { if (!this.moveLock) { // Lock move requests this.$store.commit('changeMoveLock', true); this.moveLock = true this.isAutofocusing = true axios.post(this.fastAutofocusApiUri, {dz: dz, backlash: backlash}) .then(response => { Loading @@ -258,8 +259,8 @@ export default { }) .finally(() => { console.log("Cleaning up after autofocus.") this.isAutofocusing = false; this.$store.commit('changeMoveLock', false); // Release the move lock this.isAutofocusing = false this.moveLock = false // Release the move lock }) } } Loading
src/store.js +0 −4 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ export default new Vuex.Store({ error: '', apiConfig: {}, apiState: {}, moveLock: false, settings: { disableStream: false, autoGpuPreview: false, Loading @@ -35,9 +34,6 @@ export default new Vuex.Store({ changeWaiting(state, waiting) { state.waiting = waiting }, changeMoveLock(state, lock) { state.moveLock = lock }, commitError(state, errorString) { state.error = errorString; }, Loading