@geode/opengeodeweb-front 10.20.0-rc.1 → 10.20.0-rc.3

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.
@@ -50,6 +50,12 @@ const camera_options = computed(() => [
50
50
  tooltip: "Highlight on hover",
51
51
  icon: "mdi-cursor-default-click",
52
52
  color: hybridViewerStore.is_hover_highlight ? "primary" : undefined,
53
+ action: hybridViewerStore.is_hover_highlight
54
+ ? () => {
55
+ hybridViewerStore.is_hover_highlight = false;
56
+ hybridViewerStore.clearHoverHighlight();
57
+ }
58
+ : undefined,
53
59
  menu: [
54
60
  {
55
61
  title: "Cells",
@@ -138,7 +144,11 @@ const camera_options = computed(() => [
138
144
  <v-container :class="[$style.floatToolbar, 'pa-0', 'view-toolbar']" width="auto">
139
145
  <v-row v-for="camera_option in camera_options" :key="camera_option.icon" dense>
140
146
  <v-col>
141
- <v-menu v-if="camera_option.menu" location="start" :close-on-content-click="false">
147
+ <v-menu
148
+ v-if="camera_option.menu && !camera_option.action"
149
+ location="start"
150
+ :close-on-content-click="false"
151
+ >
142
152
  <template #activator="{ props }">
143
153
  <ActionButton
144
154
  v-bind="props"
@@ -3,6 +3,7 @@ import OverlappingObjectsPicker from "@ogw_front/components/Viewer/OverlappingOb
3
3
  import ViewerContextMenu from "@ogw_front/components/Viewer/ContextMenu/ContextMenu";
4
4
  import ViewerObjectTreeLayout from "@ogw_front/components/Viewer/ObjectTree/Layout";
5
5
  import { getCurrentInstance } from "vue";
6
+ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
6
7
  import { useMenuStore } from "@ogw_front/stores/menu";
7
8
  import { useOverlappingPicker } from "@ogw_front/composables/use_overlapping_picker";
8
9
  import { useViewerStore } from "@ogw_front/stores/viewer";
@@ -16,6 +17,18 @@ const { displayMenu, containerWidth, containerHeight } = defineProps({
16
17
  const emit = defineEmits(["show-menu"]);
17
18
  const menuStore = useMenuStore();
18
19
  const viewerStore = useViewerStore();
20
+ const hybridViewerStore = useHybridViewerStore();
21
+
22
+ function stopHoverHighlight() {
23
+ hybridViewerStore.is_hover_highlight = false;
24
+ hybridViewerStore.clearHoverHighlight();
25
+ }
26
+
27
+ onKeyStroke("Escape", () => {
28
+ if (hybridViewerStore.is_hover_highlight) {
29
+ stopHoverHighlight();
30
+ }
31
+ });
19
32
 
20
33
  const {
21
34
  displayIntermediate,
@@ -91,6 +104,29 @@ defineExpose({ get_viewer_id });
91
104
  </v-chip>
92
105
  </div>
93
106
  </v-fade-transition>
107
+
108
+ <v-fade-transition>
109
+ <div
110
+ v-if="hybridViewerStore.is_hover_highlight"
111
+ class="picking-message-container d-flex justify-center w-100 pa-4"
112
+ >
113
+ <v-chip
114
+ color="primary"
115
+ elevation="8"
116
+ size="large"
117
+ variant="flat"
118
+ class="pick-pulse"
119
+ style="pointer-events: auto"
120
+ @click="stopHoverHighlight"
121
+ >
122
+ Highlight active ({{
123
+ hybridViewerStore.hover_highlight_field_type === "CELL" ? "Cells" : "Points"
124
+ }}) &middot; Esc to stop
125
+ <v-divider vertical class="mx-2 my-1" opacity="0.3" />
126
+ <v-icon icon="mdi-close" size="small" />
127
+ </v-chip>
128
+ </div>
129
+ </v-fade-transition>
94
130
  </template>
95
131
 
96
132
  <style scoped>
@@ -30,7 +30,7 @@ export const useViewerStore = defineStore(
30
30
  const picked_point = ref({ x: undefined, y: undefined, z: undefined });
31
31
  const request_counter = ref(0);
32
32
  const status = ref(Status.NOT_CONNECTED);
33
- const buzy = ref(0);
33
+ const busy = ref(0);
34
34
 
35
35
  const protocol = computed(() => {
36
36
  if (infraStore.app_mode === appMode.CLOUD) {
@@ -88,7 +88,7 @@ export const useViewerStore = defineStore(
88
88
  }
89
89
 
90
90
  client.value.onBusyChange((count) => {
91
- buzy.value = count;
91
+ busy.value = count;
92
92
  });
93
93
  client.value.onConnectionError((httpReq) => {
94
94
  const message = httpReq?.response?.error || `Connection error`;
@@ -4,23 +4,16 @@ const RGB_MAX = 255;
4
4
  const BACKGROUND_GREY_VALUE = 180;
5
5
  const ACTOR_DARK_VALUE = 20;
6
6
 
7
- const BACKGROUND_COLOR = [
8
- BACKGROUND_GREY_VALUE / RGB_MAX,
9
- BACKGROUND_GREY_VALUE / RGB_MAX,
10
- BACKGROUND_GREY_VALUE / RGB_MAX,
11
- ];
12
- const ACTOR_COLOR = [
13
- ACTOR_DARK_VALUE / RGB_MAX,
14
- ACTOR_DARK_VALUE / RGB_MAX,
15
- ACTOR_DARK_VALUE / RGB_MAX,
16
- ];
17
- const WHEEL_TIME_OUT_MS = 600;
18
- const HOVER_THROTTLE_MS = 50;
19
- const HOVER_TIMEOUT_MS = 500;
20
-
21
- const SAMPLE_SIZE = 10;
22
- const TOTAL_CHANNELS = 400;
23
- const RGBA_CHANNELS = 4;
7
+ const bgVal = BACKGROUND_GREY_VALUE / RGB_MAX;
8
+ const BACKGROUND_COLOR = [bgVal, bgVal, bgVal];
9
+ const actVal = ACTOR_DARK_VALUE / RGB_MAX;
10
+ const ACTOR_COLOR = [actVal, actVal, actVal];
11
+ const HOVER_THROTTLE_MS = 50,
12
+ HOVER_TIMEOUT_MS = 500,
13
+ WHEEL_TIME_OUT_MS = 600;
14
+ const RGBA_CHANNELS = 4,
15
+ SAMPLE_SIZE = 10,
16
+ TOTAL_CHANNELS = 400;
24
17
 
25
18
  function mapRect(rect, latestImage, canvasRect) {
26
19
  const scaleX = latestImage.width / canvasRect.width;
@@ -226,6 +219,7 @@ function performSetContainer(options) {
226
219
 
227
220
  resize(container.value.$el.offsetWidth, container.value.$el.offsetHeight);
228
221
 
222
+ let has_dragged = false;
229
223
  useMousePressed({
230
224
  target: container,
231
225
  onPressed: (event) => {
@@ -244,21 +238,28 @@ function performSetContainer(options) {
244
238
  return;
245
239
  }
246
240
  is_moving.value = true;
241
+ has_dragged = false;
247
242
  event.stopPropagation();
248
- imageStyle.opacity = 0;
249
243
  },
250
244
  onReleased: () => {
251
- if (is_moving.value) {
252
- is_moving.value = false;
245
+ is_moving.value = false;
246
+ if (has_dragged) {
247
+ genericRenderWindow.getRenderer().resetCameraClippingRange();
253
248
  syncRemoteCamera();
254
249
  }
255
- is_moving.value = false;
256
- genericRenderWindow.getRenderer().resetCameraClippingRange();
257
- syncRemoteCamera();
250
+ has_dragged = false;
258
251
  },
259
252
  });
260
253
 
261
- useEventListener(container, "mousemove", hoverHighlight);
254
+ useEventListener(container, "mousemove", (event) => {
255
+ if (is_moving.value) {
256
+ has_dragged = true;
257
+ if (imageStyle) {
258
+ imageStyle.opacity = 0;
259
+ }
260
+ }
261
+ hoverHighlight(event);
262
+ });
262
263
  useEventListener(container, "wheel", () => {
263
264
  is_moving.value = true;
264
265
  if (imageStyle) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.20.0-rc.1",
3
+ "version": "10.20.0-rc.3",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {