From d0641d0cb6dfa368bbd074555cd632f709eaa5f3 Mon Sep 17 00:00:00 2001 From: Declan Date: Sat, 7 Jan 2023 06:51:01 -0800 Subject: [PATCH] Fix the reflective mode color picker (#715) Co-authored-by: Mohammad Durrani <46766905+mdurrani808@users.noreply.github.com> --- photon-client/src/components/common/cv-image.vue | 4 ++-- photon-client/src/views/PipelineView.vue | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/photon-client/src/components/common/cv-image.vue b/photon-client/src/components/common/cv-image.vue index 32c466143..40c4472f1 100644 --- a/photon-client/src/components/common/cv-image.vue +++ b/photon-client/src/components/common/cv-image.vue @@ -4,7 +4,7 @@ crossOrigin="anonymous" :style="styleObject" :src="src" - alt="" + :alt="alt" @click="clickHandler" @error="loadErrHandler" /> @@ -14,7 +14,7 @@ export default { name: "CvImage", // eslint-disable-next-line vue/require-prop-types - props: ['address', 'scale', 'maxHeight', 'maxHeightMd', 'maxHeightLg', 'maxHeightXl', 'colorPicking', 'id', 'disconnected'], + props: ['address', 'scale', 'maxHeight', 'maxHeightMd', 'maxHeightLg', 'maxHeightXl', 'colorPicking', 'id', 'disconnected', 'alt'], data() { return { seed: 1.0, diff --git a/photon-client/src/views/PipelineView.vue b/photon-client/src/views/PipelineView.vue index 368da8ab1..a6f7ef489 100644 --- a/photon-client/src/views/PipelineView.vue +++ b/photon-client/src/views/PipelineView.vue @@ -67,7 +67,7 @@ :max-height-md="$store.getters.isDriverMode ? '50vh' : '380px'" :max-height-lg="$store.getters.isDriverMode ? '55vh' : '390px'" :max-height-xl="$store.getters.isDriverMode ? '60vh' : '450px'" - :alt="'Stream ' + idx" + :alt="idx === 0 ? 'Raw stream' : 'Processed stream'" :color-picking="$store.state.colorPicking && idx === 0" @click="onImageClick" /> @@ -488,8 +488,6 @@ export default { this.$refs.streams.forEach(it => it.reload()) }, onImageClick(event) { - // Only run on the input stream - if (event.target.alt !== "Stream0") return; // Get a reference to the threshold tab (if it is shown) and call its "onClick" method let ref = this.$refs["Threshold"]; if (ref && ref[0])