Skip to content

Commit f79b6ba

Browse files
committed
Only show bounding box tool for NABat
1 parent 09a1420 commit f79b6ba

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

client/src/components/geoJS/LayerManager.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export default defineComponent({
6868
measuring,
6969
frequencyRulerY,
7070
drawingBoundingBox,
71+
isNaBat,
7172
} = useState();
7273
const selectedAnnotationId: Ref<null | number> = ref(null);
7374
const hoveredAnnotationId: Ref<null | number> = ref(null);
@@ -540,11 +541,12 @@ export default defineComponent({
540541
}
541542
});
542543
543-
if (!boundingBoxLayer) {
544+
if (isNaBat() && !boundingBoxLayer) {
544545
boundingBoxLayer = new BoundingBoxLayer(props.geoViewerRef, event, props.spectroInfo, drawingBoundingBox.value);
545546
boundingBoxLayer.setScaledDimensions(props.scaledWidth, props.scaledHeight);
546547
}
547548
watch(drawingBoundingBox, () => {
549+
if (!isNaBat) return;
548550
if (drawingBoundingBox.value) {
549551
boundingBoxLayer.enableDrawing();
550552
} else {
@@ -722,7 +724,7 @@ export default defineComponent({
722724
if (measureToolLayer) {
723725
measureToolLayer.setTextColor(textColor);
724726
}
725-
if (boundingBoxLayer) {
727+
if (isNaBat() && boundingBoxLayer) {
726728
boundingBoxLayer.setTextColor(textColor);
727729
}
728730
}

client/src/views/Spectrogram.vue

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ export default defineComponent({
6666
configuration,
6767
measuring,
6868
toggleMeasureMode,
69-
drawingBoundingBox,
70-
toggleDrawingBoundingBox,
7169
} = useState();
7270
const images: Ref<HTMLImageElement[]> = ref([]);
7371
const spectroInfo: Ref<SpectroInfo | undefined> = ref();
@@ -244,9 +242,6 @@ export default defineComponent({
244242
};
245243
watch(compressed, () => {
246244
loadData();
247-
if (drawingBoundingBox.value) {
248-
toggleDrawingBoundingBox();
249-
}
250245
if (measuring.value) {
251246
toggleMeasureMode();
252247
}
@@ -325,8 +320,6 @@ export default defineComponent({
325320
colorpickerMenu,
326321
measuring,
327322
toggleMeasureMode,
328-
drawingBoundingBox,
329-
toggleDrawingBoundingBox,
330323
// Other user selection
331324
otherUserAnnotations,
332325
sequenceAnnotations,
@@ -433,20 +426,6 @@ export default defineComponent({
433426
</v-select>
434427
</v-col>
435428
<v-spacer />
436-
<v-tooltip>
437-
<template #activator="{ props: subProps }">
438-
<v-icon
439-
v-bind="subProps"
440-
size="35"
441-
class="mr-5 mt-5"
442-
:color="drawingBoundingBox ? 'blue' : ''"
443-
@click="toggleDrawingBoundingBox"
444-
>
445-
mdi-border-radius
446-
</v-icon>
447-
</template>
448-
<span>Draw bounding boxes to measure pulses</span>
449-
</v-tooltip>
450429
<v-tooltip>
451430
<template #activator="{props: subProps }">
452431
<v-icon

0 commit comments

Comments
 (0)