@geode/opengeodeweb-front 10.20.0-rc.1 → 10.20.0-rc.2
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/app/stores/viewer.js +2 -2
- package/internal/stores/hybrid_viewer.js +25 -24
- package/package.json +1 -1
package/app/stores/viewer.js
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
252
|
-
|
|
245
|
+
is_moving.value = false;
|
|
246
|
+
if (has_dragged) {
|
|
247
|
+
genericRenderWindow.getRenderer().resetCameraClippingRange();
|
|
253
248
|
syncRemoteCamera();
|
|
254
249
|
}
|
|
255
|
-
|
|
256
|
-
genericRenderWindow.getRenderer().resetCameraClippingRange();
|
|
257
|
-
syncRemoteCamera();
|
|
250
|
+
has_dragged = false;
|
|
258
251
|
},
|
|
259
252
|
});
|
|
260
253
|
|
|
261
|
-
useEventListener(container, "mousemove",
|
|
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