separate annotation guard

This commit is contained in:
Scott Bell 2023-04-25 14:02:34 +02:00
parent bd356653db
commit 3a77efb010
3 changed files with 17 additions and 4 deletions

View File

@ -14,7 +14,7 @@ $elemBg: rgba(black, 0.7);
position: absolute;
left: 0;
top: 0;
z-index: 4;
z-index: 3;
@include userSelectNone;
}

View File

@ -97,7 +97,7 @@
:sized-image-dimensions="sizedImageDimensions"
/>
<AnnotationsCanvas
v-if="shouldDisplayCompass"
v-if="shouldDisplayAnnotations"
:image="focusedImage"
:imagery-annotations="imageryAnnotations[focusedImage.time]"
/>
@ -429,6 +429,19 @@ export default {
return result;
},
shouldDisplayAnnotations() {
const imageHeightAndWidth = this.sizedImageHeight !== 0
&& this.sizedImageWidth !== 0;
const display = this.focusedImage !== undefined
&& this.focusedImageNaturalAspectRatio !== undefined
&& this.imageContainerWidth !== undefined
&& this.imageContainerHeight !== undefined
&& imageHeightAndWidth
&& this.zoomFactor === 1
&& this.imagePanned !== true;
return display;
},
shouldDisplayCompass() {
const imageHeightAndWidth = this.sizedImageHeight !== 0
&& this.sizedImageWidth !== 0;
@ -763,7 +776,7 @@ export default {
const incomingSelectedAnnotation = selection?.[0]?.[0]?.context?.annotations?.[0];
console.debug(`📲 incoming search selections`, incomingSelectedAnnotation);
// for incoming search results, we should:
// TODO: for incoming search results, we should:
// 1. set the the time bounds to match the search result
// 2. search the imageHistory for the image that matches the time of the search result
// 3. using the index from the above, "click" on the image to select it

View File

@ -532,5 +532,5 @@
position: absolute;
left: 0;
top: 0;
z-index: 3;
z-index: 2;
}