@3cr/viewer-browser 0.0.113 → 0.0.115

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3cr/viewer-browser",
3
- "version": "0.0.113",
3
+ "version": "0.0.115",
4
4
  "main": "./dist/Viewer3CR.umd.js",
5
5
  "module": "dist/Viewer3CR.umd.js",
6
6
  "homepage": "https://docs.3cr.singular.health",
@@ -483,7 +483,7 @@
483
483
  >
484
484
  <div
485
485
  class="bordered-event-window"
486
- v-for="layout in scanState.Layout.PositionData"
486
+ v-for="(layout, index) in scanState.Layout.PositionData"
487
487
  :key="layout.Anchor"
488
488
  :style="{
489
489
  ...generateDivStyleForLayout(layout),
@@ -497,7 +497,12 @@
497
497
  <v-hover>
498
498
  <template v-slot:default="{ isHovering, props }">
499
499
  <div style="width: 100%; height: 100%" v-bind="props">
500
- <div class="buttons-in-view" v-show="isHovering">
500
+ <div
501
+ class="buttons-in-view"
502
+ v-show="
503
+ isHovering || menu || menus.filter((x) => x).length > 0
504
+ "
505
+ >
501
506
  <div v-if="scanState.Layout.PositionData.length !== 1">
502
507
  <v-btn
503
508
  color="transparent"
@@ -558,37 +563,38 @@
558
563
  v-if="getCurrentActiveView(layout) === ScanView.Volume"
559
564
  >
560
565
  <v-menu
566
+ v-model="menu"
561
567
  :close-on-content-click="false"
562
- :close-on-click="true"
568
+ location="end"
563
569
  >
564
570
  <template v-slot:activator="{ props }">
565
- <div v-bind="{ ...props }">
566
- <v-btn color="transparent" :icon="true">
567
- <v-icon color="white">cut</v-icon>
568
- </v-btn>
569
- <v-tooltip
570
- target="cursor"
571
- location="top"
572
- activator="parent"
573
- >
574
- Slice the 3D Volume
575
- </v-tooltip>
576
- </div>
571
+ <v-tooltip location="top">
572
+ <template v-slot:activator="{ props: tooltip }">
573
+ <v-btn
574
+ v-bind="mergeProps(props, tooltip)"
575
+ color="transparent"
576
+ :icon="true"
577
+ >
578
+ <v-icon color="white">cut</v-icon>
579
+ </v-btn>
580
+ </template>
581
+ Slice the 3D Volume
582
+ </v-tooltip>
577
583
  </template>
578
584
  <v-card min-width="400" class="pb-2">
579
585
  <v-card-title>Slice into the 3D Volume</v-card-title>
580
586
  <DoubleSliderSelector
581
- v-model="tSlider"
587
+ v-model:value="tSlider"
582
588
  label="Transverse"
583
589
  v-bind="tMinMax"
584
590
  />
585
591
  <DoubleSliderSelector
586
- v-model="sSlider"
592
+ v-model:value="sSlider"
587
593
  label="Sagittal"
588
594
  v-bind="sMinMax"
589
595
  />
590
596
  <DoubleSliderSelector
591
- v-model="cSlider"
597
+ v-model:value="cSlider"
592
598
  label="Coronal"
593
599
  v-bind="cMinMax"
594
600
  />
@@ -599,6 +605,7 @@
599
605
  v-if="getCurrentActiveView(layout) !== ScanView.Volume"
600
606
  >
601
607
  <v-menu
608
+ v-model="menus[index]"
602
609
  :close-on-content-click="false"
603
610
  :close-on-click="true"
604
611
  offset-overflow
@@ -609,8 +616,7 @@
609
616
  <template #activator="{ props: ttprops }">
610
617
  <v-btn
611
618
  v-bind="{ ...props, ...ttprops }"
612
- icon
613
- class="icon transparent"
619
+ :icon="true"
614
620
  >
615
621
  <v-icon color="white">360</v-icon>
616
622
  </v-btn>
@@ -728,7 +734,15 @@ import {
728
734
  SlidersActions,
729
735
  ViewSelectionActions,
730
736
  } from "@3cr/types-ts";
731
- import { defineEmits, nextTick, ref, unref, watch, WatchSource } from "vue";
737
+ import {
738
+ defineEmits,
739
+ mergeProps,
740
+ nextTick,
741
+ ref,
742
+ unref,
743
+ watch,
744
+ WatchSource,
745
+ } from "vue";
732
746
 
733
747
  import {
734
748
  checkIsDemo,
@@ -793,6 +807,8 @@ const props = withDefaults(defineProps<Props>(), {
793
807
  const web_gl = ref<typeof WebGL3DR | null>(null);
794
808
  const payloadHandler = new PayloadHandler(web_gl);
795
809
  const value = ref<boolean>(false);
810
+ const menu = ref<boolean>(false);
811
+ const menus = ref<Array<boolean>>([false, false, false, false]);
796
812
  const drawer = ref<boolean>(true);
797
813
  const drawerCollapsed = ref<boolean>(true);
798
814
  const scanLoading = ref<boolean>(true);
@@ -72,7 +72,7 @@ export const tSlider = computed({
72
72
  },
73
73
  set(value: Array<number>) {
74
74
  scanState.value.Slice.TransverseLower = value[0];
75
- scanState.value.Slice.TransverseLower = value[1];
75
+ scanState.value.Slice.TransverseUpper = value[1];
76
76
  },
77
77
  });
78
78
  export const sSlider = computed({