Merge branch 'improve_calibration_modal' into 'v3'
Adjust z height in calibration modal Closes #458 See merge request openflexure/openflexure-microscope-server!365
This commit is contained in:
commit
473a09442a
2 changed files with 73 additions and 9 deletions
|
|
@ -4,7 +4,8 @@
|
||||||
class="uk-margin-remove uk-padding-remove"
|
class="uk-margin-remove uk-padding-remove"
|
||||||
>
|
>
|
||||||
<div v-if="taskStarted" ref="isPollingElement">
|
<div v-if="taskStarted" ref="isPollingElement">
|
||||||
<action-progress-bar :progress="progress" :task-status="taskStatus" />
|
<action-progress-bar v-if="taskStarted && hideOnRun" :progress="progress" :task-status="taskStatus" />
|
||||||
|
<!-- hideOnRun selects if the button hides, don't show progress bar if button doesn't hide. -->
|
||||||
<button
|
<button
|
||||||
v-if="canTerminate && taskRunning"
|
v-if="canTerminate && taskRunning"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -19,7 +20,7 @@
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
:hidden="taskStarted"
|
:hidden="taskStarted && hideOnRun"
|
||||||
class="uk-button uk-width-1-1"
|
class="uk-button uk-width-1-1"
|
||||||
:class="[buttonPrimary ? 'uk-button-primary' : 'uk-button-default']"
|
:class="[buttonPrimary ? 'uk-button-primary' : 'uk-button-default']"
|
||||||
@click="bootstrapTask()"
|
@click="bootstrapTask()"
|
||||||
|
|
@ -139,6 +140,11 @@ export default {
|
||||||
required: false,
|
required: false,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
hideOnRun: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,45 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-show="stepValue == 2">
|
<div v-show="stepValue == 2">
|
||||||
|
<h3>Adjust z height</h3>
|
||||||
|
<p>
|
||||||
|
Insert a sample and adjust the z position of
|
||||||
|
the stage using the buttons below, until the
|
||||||
|
sample is in focus.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
You may also adjust the z position with <b>page up</b> and <b>page down</b>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<miniStreamDisplay
|
||||||
|
v-if="stepValue == 2"
|
||||||
|
class="mini-preview"
|
||||||
|
></miniStreamDisplay>
|
||||||
|
<div class="action-button-container">
|
||||||
|
<action-button
|
||||||
|
class="moveZ"
|
||||||
|
thing="stage"
|
||||||
|
action="move_relative"
|
||||||
|
:button-primary="false"
|
||||||
|
:submit-data="{ x: 0, y: 0, z: -100}"
|
||||||
|
:submit-label="' - '"
|
||||||
|
:hideOnRun="false"
|
||||||
|
:can-terminate="false"
|
||||||
|
/>
|
||||||
|
<action-button
|
||||||
|
class="moveZ"
|
||||||
|
thing="stage"
|
||||||
|
action="move_relative"
|
||||||
|
:button-primary="false"
|
||||||
|
:submit-data="{ x: 0, y: 0, z: 100}"
|
||||||
|
:submit-label="'+'"
|
||||||
|
:can-terminate="false"
|
||||||
|
:hideOnRun="false"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-show="stepValue == 3">
|
||||||
<h3>Camera-stage mapping</h3>
|
<h3>Camera-stage mapping</h3>
|
||||||
<div v-if="isCSMCalibrated">
|
<div v-if="isCSMCalibrated">
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -87,7 +126,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<miniStreamDisplay
|
<miniStreamDisplay
|
||||||
v-if="stepValue == 2"
|
v-if="stepValue == 3"
|
||||||
class="mini-preview"
|
class="mini-preview"
|
||||||
></miniStreamDisplay>
|
></miniStreamDisplay>
|
||||||
|
|
||||||
|
|
@ -99,7 +138,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-show="stepValue == 3">
|
<div v-show="stepValue == 4">
|
||||||
<p>
|
<p>
|
||||||
<b>Calibration complete</b>
|
<b>Calibration complete</b>
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -118,7 +157,7 @@
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-show="stepValue == 3"
|
v-show="stepValue == 4"
|
||||||
class="uk-button uk-button-default"
|
class="uk-button uk-button-default"
|
||||||
type="button"
|
type="button"
|
||||||
@click="restart()"
|
@click="restart()"
|
||||||
|
|
@ -126,7 +165,7 @@
|
||||||
Restart
|
Restart
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-show="stepValue < 3"
|
v-show="stepValue < 4"
|
||||||
class="uk-button uk-button-primary uk-margin-left"
|
class="uk-button uk-button-primary uk-margin-left"
|
||||||
type="button"
|
type="button"
|
||||||
@click="increment()"
|
@click="increment()"
|
||||||
|
|
@ -134,7 +173,7 @@
|
||||||
Next
|
Next
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-show="stepValue == 3"
|
v-show="stepValue == 4"
|
||||||
class="uk-button uk-button-primary uk-margin-left"
|
class="uk-button uk-button-primary uk-margin-left"
|
||||||
type="button"
|
type="button"
|
||||||
@click="hide()"
|
@click="hide()"
|
||||||
|
|
@ -150,6 +189,7 @@
|
||||||
import cameraCalibrationSettings from "../tabContentComponents/settingsComponents/cameraSettingsComponents/cameraCalibrationSettings.vue";
|
import cameraCalibrationSettings from "../tabContentComponents/settingsComponents/cameraSettingsComponents/cameraCalibrationSettings.vue";
|
||||||
import CSMCalibrationSettings from "../tabContentComponents/settingsComponents/CSMSettingsComponents/CSMCalibrationSettings.vue";
|
import CSMCalibrationSettings from "../tabContentComponents/settingsComponents/CSMSettingsComponents/CSMCalibrationSettings.vue";
|
||||||
import miniStreamDisplay from "../genericComponents/miniStreamDisplay.vue";
|
import miniStreamDisplay from "../genericComponents/miniStreamDisplay.vue";
|
||||||
|
import ActionButton from "../labThingsComponents/actionButton.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CalibrationModal",
|
name: "CalibrationModal",
|
||||||
|
|
@ -157,7 +197,8 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
cameraCalibrationSettings,
|
cameraCalibrationSettings,
|
||||||
CSMCalibrationSettings,
|
CSMCalibrationSettings,
|
||||||
miniStreamDisplay
|
miniStreamDisplay,
|
||||||
|
ActionButton
|
||||||
},
|
},
|
||||||
|
|
||||||
data: function() {
|
data: function() {
|
||||||
|
|
@ -223,6 +264,7 @@ export default {
|
||||||
this.onHide();
|
this.onHide();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Forces modal to show on button press
|
// Forces modal to show on button press
|
||||||
force_show: function() {
|
force_show: function() {
|
||||||
this.ready = true;
|
this.ready = true;
|
||||||
|
|
@ -260,7 +302,7 @@ export default {
|
||||||
|
|
||||||
increment: function() {
|
increment: function() {
|
||||||
// Upper bound on section number
|
// Upper bound on section number
|
||||||
if (this.stepValue < 3) {
|
if (this.stepValue < 4) {
|
||||||
this.stepValue = this.stepValue + 1;
|
this.stepValue = this.stepValue + 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -275,4 +317,20 @@ export default {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
.action-button-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row; /* Stack vertically */
|
||||||
|
justify-content: center; /* Left align */
|
||||||
|
gap: 8px; /* Small space between buttons */
|
||||||
|
margin-top: 4px; /* Gap from image */
|
||||||
|
}
|
||||||
|
>>> .moveZ .uk-button.uk-width-1-1 {
|
||||||
|
line-height: 50px;
|
||||||
|
font-size: 50px !important;
|
||||||
|
height: 60px;
|
||||||
|
padding-bottom: 46px;
|
||||||
|
margin: 0; /* Remove default margin */
|
||||||
|
width: 120px;
|
||||||
|
min-width: 80px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue