+
STEP SIZE
+
@@ -172,6 +205,16 @@ export default {
return {
stepXy: 200,
stepZz: 50,
+ stepSize: {
+ x: 200,
+ y: 200,
+ z: 50
+ },
+ invert: {
+ x: false,
+ y: false,
+ z: false
+ },
setPosition: null,
isAutofocusing: 0,
moveLock: false,
@@ -196,7 +239,26 @@ export default {
}
},
+ watch: {
+ stepSize: {
+ deep: true,
+ handler() {
+ this.setLocalStorageObj("navigation_stepSize", this.stepSize);
+ }
+ },
+ invert: {
+ deep: true,
+ handler() {
+ this.setLocalStorageObj("navigation_invert", this.invert);
+ }
+ }
+ },
+
mounted() {
+ // Reload saved settings
+ this.stepSize =
+ this.getLocalStorageObj("navigation_stepSize") || this.stepSize;
+ this.invert = this.getLocalStorageObj("navigation_invert") || this.invert;
// A global signal listener to perform a move action
this.$root.$on("globalMoveEvent", (x, y, z, absolute) => {
this.moveRequest(x, y, z, absolute);
@@ -208,9 +270,9 @@ export default {
// A global signal listener to perform a move in multiples of a step size
this.$root.$on("globalMoveStepEvent", (x_steps, y_steps, z_steps) => {
this.moveRequest(
- x_steps * this.stepXy,
- y_steps * this.stepXy,
- z_steps * this.stepZz,
+ x_steps * this.stepSize.x * (this.invert.x ? -1 : 1),
+ y_steps * this.stepSize.y * (this.invert.y ? -1 : 1),
+ z_steps * this.stepSize.z * (this.invert.z ? -1 : 1),
false
);
});
diff --git a/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/appSettings.vue b/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/appSettings.vue
index f2d1ed04..01f5cf97 100644
--- a/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/appSettings.vue
+++ b/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/appSettings.vue
@@ -35,7 +35,7 @@ export default {
},
watch: {
- appTheme() {
+ appTheme: function() {
this.setLocalStorageObj("appTheme", this.appTheme);
}
},
diff --git a/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/featuresSettings.vue b/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/featuresSettings.vue
index da240360..8d2fbde2 100644
--- a/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/featuresSettings.vue
+++ b/openflexure_microscope/api/static/src/components/tabContentComponents/settingsComponents/featuresSettings.vue
@@ -39,7 +39,7 @@ export default {
},
watch: {
- IHIEnabled() {
+ IHIEnabled: function() {
this.setLocalStorageObj("IHIEnabled", this.IHIEnabled);
}
},