@geode/opengeodeweb-front 12.2.0-rc.3 → 12.2.0-rc.5
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/.build/tests/browser/helpers/object_trees/common.js +3 -1
- package/.build/tests/browser/helpers/object_trees/model_tree_bar.js +41 -0
- package/.build/tests/browser/helpers/wait_for_action_settled.js +2 -2
- package/.build/tests/browser/suites/index.js +2 -0
- package/.build/tests/browser/suites/model/collections.js +1 -1
- package/.build/tests/browser/suites/object_tree/controls.js +2 -1
- package/.build/tests/browser/suites/object_tree/model_tree_bar.js +81 -0
- package/app/components/ClippingPlanes.vue +1 -1
- package/app/components/FactorFilterPanel.vue +1 -1
- package/app/components/Launcher.vue +3 -2
- package/app/components/ThresholdFilter.vue +1 -2
- package/app/components/Viewer/Basemap/CropOptions.vue +7 -8
- package/app/components/Viewer/Basemap/OpacityOptions.vue +7 -8
- package/app/components/Viewer/ContextMenu/CircularItems.vue +6 -43
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +1 -6
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +14 -16
- package/app/components/Viewer/EdgedCurve/PointsOptions.vue +5 -4
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +10 -13
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +8 -11
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +16 -13
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +28 -31
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +9 -11
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +8 -11
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +7 -8
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +5 -7
- package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +5 -7
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +5 -7
- package/app/components/Viewer/Generic/Model/ModelStyleOptions.vue +7 -8
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +7 -8
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +1 -1
- package/app/components/Viewer/Grid/2D/CellsOptions.vue +6 -4
- package/app/components/Viewer/Grid/2D/EdgesOptions.vue +6 -4
- package/app/components/Viewer/Grid/2D/PointsOptions.vue +5 -4
- package/app/components/Viewer/Grid/3D/CellsOptions.vue +6 -4
- package/app/components/Viewer/Grid/3D/EdgesOptions.vue +6 -4
- package/app/components/Viewer/Grid/3D/FacetsOptions.vue +6 -4
- package/app/components/Viewer/Grid/3D/PointsOptions.vue +5 -4
- package/app/components/Viewer/Image/ImageOptions.vue +10 -13
- package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +17 -1
- package/app/components/Viewer/ObjectTree/Base/ComponentRelations.vue +2 -2
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +26 -2
- package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +4 -1
- package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +6 -8
- package/app/components/Viewer/ObjectTree/Box.vue +30 -5
- package/app/components/Viewer/ObjectTree/Layout.vue +183 -54
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +10 -15
- package/app/components/Viewer/ObjectTree/Views/ModelTree.vue +3 -0
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +28 -31
- package/app/components/Viewer/Scene/BackgroundOptions.vue +4 -7
- package/app/components/Viewer/Scene/OrientationWidgetOptions.vue +4 -7
- package/app/components/Viewer/Scene/TextOptions.vue +4 -7
- package/app/components/Viewer/Solid/EdgesOptions.vue +6 -4
- package/app/components/Viewer/Solid/PointsOptions.vue +5 -4
- package/app/components/Viewer/Solid/PolygonsOptions.vue +6 -4
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +8 -11
- package/app/components/Viewer/Surface/EdgesOptions.vue +6 -4
- package/app/components/Viewer/Surface/PointsOptions.vue +6 -4
- package/app/components/Viewer/Surface/PolygonsOptions.vue +8 -11
- package/app/components/Viewer/Surface/Triangulated/TrianglesOptions.vue +5 -4
- package/app/components/Viewer/TetrahedralSolid/TetrahedraOptions.vue +6 -4
- package/app/components/Viewer/TetrahedralSolid/TrianglesOptions.vue +6 -4
- package/app/composables/circular_menu.ts +45 -0
- package/app/composables/hover_highlight.ts +1 -1
- package/app/composables/model_menu_context.ts +7 -11
- package/app/composables/model_tree.ts +3 -3
- package/app/composables/model_tree_drag.ts +56 -0
- package/app/composables/project_manager_helpers/types.ts +2 -3
- package/app/composables/use_adaptive_styles.ts +15 -8
- package/app/composables/use_overlapping_picker.ts +7 -19
- package/app/composables/viewer_context_menu.ts +2 -1
- package/app/composables/virtual_tree.ts +7 -1
- package/app/stores/api.ts +6 -59
- package/app/stores/app.ts +21 -55
- package/app/stores/back.ts +86 -145
- package/app/stores/camera_manager.ts +12 -25
- package/app/stores/cloud.ts +21 -101
- package/app/stores/crs.ts +3 -2
- package/app/stores/data.ts +66 -409
- package/app/stores/data_style.ts +99 -93
- package/app/stores/feedback.ts +57 -53
- package/app/stores/infra.ts +61 -101
- package/app/stores/treeview.ts +39 -30
- package/app/stores/viewer.ts +9 -29
- package/app/stores/viewer_helpers/actions.ts +1 -23
- package/app/utils/backend_lifecycle.ts +155 -0
- package/app/utils/import_item.ts +5 -4
- package/app/utils/threshold_sources.ts +3 -2
- package/app/utils/treeview.ts +25 -1
- package/app/utils/viewer_object_type.ts +21 -0
- package/internal/database/base_database.ts +2 -1
- package/internal/database/database.ts +90 -7
- package/internal/database/queries.ts +45 -0
- package/internal/database/tables/camera_positions.ts +11 -1
- package/internal/database/tables/data.ts +20 -1
- package/internal/database/tables/data_style.ts +3 -1
- package/internal/database/tables/model_component_datastyle.ts +3 -1
- package/internal/database/tables/model_component_type_datastyle.ts +3 -1
- package/internal/database/tables/model_components.ts +12 -1
- package/internal/database/tables/model_components_relation.ts +11 -1
- package/internal/database/tables/scene_style.ts +3 -1
- package/internal/database/tables/treeview_config.ts +31 -0
- package/internal/stores/data/items.ts +110 -0
- package/internal/stores/data/model/collections.ts +107 -0
- package/internal/stores/data/model/components.ts +129 -0
- package/internal/stores/data/model/mesh_components.ts +134 -0
- package/internal/stores/data/model/relations.ts +76 -0
- package/internal/stores/data/model/types.ts +14 -0
- package/internal/stores/data/registration.ts +54 -0
- package/internal/stores/data/snapshot.ts +83 -0
- package/internal/stores/data/types.ts +26 -0
- package/internal/stores/data_style/model/common_mutations.ts +47 -77
- package/internal/stores/data_style/model/selection.ts +3 -10
- package/internal/stores/data_style/scene.ts +2 -2
- package/internal/stores/data_style/state.ts +10 -8
- package/internal/stores/data_style/state_shared.ts +10 -7
- package/internal/stores/hybrid_viewer/brightness.ts +36 -19
- package/internal/stores/hybrid_viewer/highlight.ts +9 -14
- package/internal/stores/hybrid_viewer/scene.ts +1 -1
- package/internal/stores/microservice.ts +192 -0
- package/package.json +1 -1
- package/tests/browser/helpers/data/helpers/attribute.ts +2 -1
- package/tests/browser/helpers/object_trees/common.ts +4 -0
- package/tests/browser/helpers/object_trees/model_tree_bar.ts +78 -0
- package/tests/browser/helpers/wait_for_action_settled.ts +2 -3
- package/tests/browser/suites/model/collections.ts +2 -1
- package/tests/browser/suites/object_tree/controls.ts +3 -0
- package/tests/browser/suites/object_tree/model_tree_bar.ts +125 -0
- package/app/stores/data_helpers/collections.ts +0 -122
- package/app/stores/data_helpers/mesh.ts +0 -167
- package/app/stores/data_helpers/relations.ts +0 -94
|
@@ -6,6 +6,7 @@ import ViewerObjectTreeBox from "@ogw_front/components/Viewer/ObjectTree/Box.vue
|
|
|
6
6
|
import { geodeObjectImage } from "@ogw_front/assets/geode_objects";
|
|
7
7
|
import { useAdaptiveStyles } from "@ogw_front/composables/use_adaptive_styles";
|
|
8
8
|
import { useModelHeaderHover } from "@ogw_front/composables/model_header_hover";
|
|
9
|
+
import { useModelTreeDrag } from "@ogw_front/composables/model_tree_drag";
|
|
9
10
|
import { useTreeviewStore } from "@ogw_front/stores/treeview";
|
|
10
11
|
|
|
11
12
|
const WIDTH_MIN = 100;
|
|
@@ -27,6 +28,8 @@ const { containerWidth } = defineProps<Props>();
|
|
|
27
28
|
|
|
28
29
|
const treeviewStore = useTreeviewStore();
|
|
29
30
|
const { onModelHeaderEnter, onModelHeaderLeave } = useModelHeaderHover();
|
|
31
|
+
const { draggedId, dropTargetId, onDragStart, onDragOver, onDragEnd, onDrop, dropSide } =
|
|
32
|
+
useModelTreeDrag();
|
|
30
33
|
|
|
31
34
|
interface Emits {
|
|
32
35
|
"show-menu": [payload: TreeMenuPayload];
|
|
@@ -43,9 +46,14 @@ const mainView = computed(() => treeviewStore.opened_views.find((view) => view.i
|
|
|
43
46
|
const additionalViews = computed(() =>
|
|
44
47
|
treeviewStore.opened_views.filter((view) => view.id !== "main"),
|
|
45
48
|
);
|
|
49
|
+
// The model trees not collapsed in the activity bar
|
|
50
|
+
const shownViews = computed(() => additionalViews.value.filter((view) => view.collapsed !== true));
|
|
51
|
+
// From two model trees, one button collapses them all, or shows them all again once all are collapsed
|
|
52
|
+
const MIN_MODEL_TREES_FOR_ALL = 2;
|
|
53
|
+
const showAllToggle = computed(() => additionalViews.value.length >= MIN_MODEL_TREES_FOR_ALL);
|
|
46
54
|
|
|
47
55
|
const totalWidth = computed<string>(() => {
|
|
48
|
-
const hasAdditional =
|
|
56
|
+
const hasAdditional = shownViews.value.length > 0;
|
|
49
57
|
const hasMain = Boolean(mainView.value);
|
|
50
58
|
const gap = hasAdditional && hasMain ? GAP_WIDTH : 0;
|
|
51
59
|
const firstColWidth = hasMain ? treeviewStore.panelWidth : 0;
|
|
@@ -57,10 +65,9 @@ const rowHeights = computed<number[]>({
|
|
|
57
65
|
get: () => treeviewStore.rowHeights,
|
|
58
66
|
set: (val) => treeviewStore.setRowHeights(val),
|
|
59
67
|
});
|
|
60
|
-
const draggedIndex = ref<number | undefined>(undefined);
|
|
61
68
|
|
|
62
69
|
watch(
|
|
63
|
-
() =>
|
|
70
|
+
() => shownViews.value.length,
|
|
64
71
|
(newLength) => {
|
|
65
72
|
if (newLength > 0 && rowHeights.value.length !== newLength) {
|
|
66
73
|
treeviewStore.setRowHeights(Array.from({ length: newLength }, () => PERCENT_100 / newLength));
|
|
@@ -69,8 +76,8 @@ watch(
|
|
|
69
76
|
{ immediate: true },
|
|
70
77
|
);
|
|
71
78
|
|
|
72
|
-
watch([maxWidth, (): number =>
|
|
73
|
-
const hasAdditional =
|
|
79
|
+
watch([maxWidth, (): number => shownViews.value.length], ([newMax]): void => {
|
|
80
|
+
const hasAdditional = shownViews.value.length > 0;
|
|
74
81
|
const gap = hasAdditional ? GAP_WIDTH : 0;
|
|
75
82
|
const total =
|
|
76
83
|
treeviewStore.panelWidth + (hasAdditional ? treeviewStore.additionalPanelWidth : 0) + gap;
|
|
@@ -101,28 +108,19 @@ function modelGeodeId(modelId: string): string | undefined {
|
|
|
101
108
|
return undefined;
|
|
102
109
|
}
|
|
103
110
|
|
|
104
|
-
function onDragStart(index: number): void {
|
|
105
|
-
draggedIndex.value = index;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function onDragOver(event: DragEvent): void {
|
|
109
|
-
event.preventDefault();
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function onDrop(targetIndex: number): void {
|
|
113
|
-
if (draggedIndex.value !== undefined && draggedIndex.value !== targetIndex) {
|
|
114
|
-
treeviewStore.moveView(draggedIndex.value, targetIndex);
|
|
115
|
-
}
|
|
116
|
-
draggedIndex.value = undefined;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
111
|
function onResizeStart(event: MouseEvent): void {
|
|
120
112
|
const startWidth = treeviewStore.panelWidth;
|
|
121
113
|
const startX = event.clientX;
|
|
114
|
+
// Both listeners go at once, also from the resize itself once a panel is closed or collapsed
|
|
115
|
+
const listeners = new AbortController();
|
|
116
|
+
function stopResize(): void {
|
|
117
|
+
listeners.abort();
|
|
118
|
+
document.body.style.userSelect = "";
|
|
119
|
+
}
|
|
122
120
|
function resize(move_event: MouseEvent): void {
|
|
123
121
|
const deltaX = move_event.clientX - startX;
|
|
124
122
|
let newWidth = startWidth + deltaX;
|
|
125
|
-
const hasAdditional =
|
|
123
|
+
const hasAdditional = shownViews.value.length > 0;
|
|
126
124
|
const gap = hasAdditional ? GAP_WIDTH : 0;
|
|
127
125
|
const currentTotalWidth =
|
|
128
126
|
newWidth + (hasAdditional ? treeviewStore.additionalPanelWidth : 0) + gap;
|
|
@@ -132,46 +130,45 @@ function onResizeStart(event: MouseEvent): void {
|
|
|
132
130
|
|
|
133
131
|
if (newWidth < AUTO_CLOSE_THRESHOLD) {
|
|
134
132
|
treeviewStore.closeView("main");
|
|
133
|
+
stopResize();
|
|
135
134
|
return;
|
|
136
135
|
}
|
|
137
136
|
|
|
138
137
|
treeviewStore.setPanelWidth(Math.max(WIDTH_MIN, newWidth));
|
|
139
138
|
document.body.style.userSelect = "none";
|
|
140
139
|
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
document.removeEventListener("mouseup", stopResize);
|
|
144
|
-
document.body.style.userSelect = "";
|
|
145
|
-
}
|
|
146
|
-
document.addEventListener("mousemove", resize);
|
|
147
|
-
document.addEventListener("mouseup", stopResize);
|
|
140
|
+
document.addEventListener("mousemove", resize, { signal: listeners.signal });
|
|
141
|
+
document.addEventListener("mouseup", stopResize, { signal: listeners.signal });
|
|
148
142
|
}
|
|
149
143
|
|
|
150
144
|
function onAdditionalResizeStart(event: MouseEvent): void {
|
|
151
145
|
const startWidth = treeviewStore.additionalPanelWidth;
|
|
152
146
|
const startX = event.clientX;
|
|
147
|
+
// Both listeners go at once, also from the resize itself once a panel is closed or collapsed
|
|
148
|
+
const listeners = new AbortController();
|
|
149
|
+
function stopResize(): void {
|
|
150
|
+
listeners.abort();
|
|
151
|
+
document.body.style.userSelect = "";
|
|
152
|
+
}
|
|
153
153
|
function resize(move_event: MouseEvent): void {
|
|
154
154
|
const deltaX = move_event.clientX - startX;
|
|
155
155
|
const newWidth = startWidth + deltaX;
|
|
156
156
|
const currentTotalWidth = treeviewStore.panelWidth + newWidth + GAP_WIDTH;
|
|
157
|
+
// Only the last shown tree collapses: the drag ends there, the next moves would collapse the others
|
|
157
158
|
if (newWidth < AUTO_CLOSE_THRESHOLD) {
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
treeviewStore.
|
|
159
|
+
const lastShownView = shownViews.value.at(-1);
|
|
160
|
+
if (lastShownView) {
|
|
161
|
+
treeviewStore.setCollapsed(lastShownView.id, true);
|
|
161
162
|
}
|
|
163
|
+
stopResize();
|
|
162
164
|
return;
|
|
163
165
|
}
|
|
164
166
|
|
|
165
167
|
treeviewStore.setAdditionalPanelWidth(Math.max(WIDTH_MIN, newWidth));
|
|
166
168
|
document.body.style.userSelect = "none";
|
|
167
169
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
document.removeEventListener("mouseup", stopResize);
|
|
171
|
-
document.body.style.userSelect = "";
|
|
172
|
-
}
|
|
173
|
-
document.addEventListener("mousemove", resize);
|
|
174
|
-
document.addEventListener("mouseup", stopResize);
|
|
170
|
+
document.addEventListener("mousemove", resize, { signal: listeners.signal });
|
|
171
|
+
document.addEventListener("mouseup", stopResize, { signal: listeners.signal });
|
|
175
172
|
}
|
|
176
173
|
|
|
177
174
|
function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
@@ -226,7 +223,7 @@ function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
|
226
223
|
<div
|
|
227
224
|
ref="activity-bar"
|
|
228
225
|
class="activity-bar d-flex flex-column align-center py-2"
|
|
229
|
-
:class="{ 'is-closed':
|
|
226
|
+
:class="{ 'is-closed': !mainView && shownViews.length === 0 }"
|
|
230
227
|
:style="activityBarAdaptiveStyles"
|
|
231
228
|
>
|
|
232
229
|
<v-btn
|
|
@@ -238,6 +235,53 @@ function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
|
238
235
|
v-tooltip="'Toggle Objects'"
|
|
239
236
|
@click="treeviewStore.toggleView('main')"
|
|
240
237
|
/>
|
|
238
|
+
<template v-if="additionalViews.length > 0">
|
|
239
|
+
<div class="activity-bar-separator" />
|
|
240
|
+
<v-btn
|
|
241
|
+
v-if="showAllToggle"
|
|
242
|
+
data-testid="toggleAllModelTreesButton"
|
|
243
|
+
:icon="shownViews.length > 0 ? 'ph-caret-double-left' : 'ph-caret-double-right'"
|
|
244
|
+
variant="text"
|
|
245
|
+
density="comfortable"
|
|
246
|
+
class="model-tree-toggle-all"
|
|
247
|
+
v-tooltip="shownViews.length > 0 ? 'Collapse all model trees' : 'Show all model trees'"
|
|
248
|
+
@click="treeviewStore.setAllCollapsed(shownViews.length > 0)"
|
|
249
|
+
/>
|
|
250
|
+
<div
|
|
251
|
+
v-for="view in additionalViews"
|
|
252
|
+
:key="view.id"
|
|
253
|
+
data-testid="modelTreeToggle"
|
|
254
|
+
class="model-tree-toggle"
|
|
255
|
+
:class="[{ 'is-collapsed': view.collapsed === true }, dropSide(view.id)]"
|
|
256
|
+
:style="view.color ? { '--model-tree-color': view.color } : undefined"
|
|
257
|
+
draggable="true"
|
|
258
|
+
@dragstart="onDragStart(view.id)"
|
|
259
|
+
@dragenter.prevent="dropTargetId = view.id"
|
|
260
|
+
@dragover="onDragOver"
|
|
261
|
+
@drop="onDrop(view.id)"
|
|
262
|
+
@dragend="onDragEnd"
|
|
263
|
+
>
|
|
264
|
+
<v-btn
|
|
265
|
+
data-testid="toggleModelTreeButton"
|
|
266
|
+
icon
|
|
267
|
+
variant="text"
|
|
268
|
+
density="comfortable"
|
|
269
|
+
v-tooltip="view.collapsed === true ? `Show ${view.title}` : `Collapse ${view.title}`"
|
|
270
|
+
@click="treeviewStore.toggleCollapsed(view.id)"
|
|
271
|
+
@mouseenter="onModelHeaderEnter(view.id)"
|
|
272
|
+
@mouseleave="onModelHeaderLeave(view.id)"
|
|
273
|
+
>
|
|
274
|
+
<v-img
|
|
275
|
+
v-if="view.geode_object_type"
|
|
276
|
+
:src="geodeObjectImage(view.geode_object_type)"
|
|
277
|
+
width="22"
|
|
278
|
+
height="22"
|
|
279
|
+
class="model-tree-toggle-icon"
|
|
280
|
+
/>
|
|
281
|
+
<v-icon v-else size="22">ph-cube</v-icon>
|
|
282
|
+
</v-btn>
|
|
283
|
+
</div>
|
|
284
|
+
</template>
|
|
241
285
|
</div>
|
|
242
286
|
|
|
243
287
|
<div class="treeview-container d-flex" :style="{ width: totalWidth }">
|
|
@@ -253,7 +297,7 @@ function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
|
253
297
|
font-icon="ph-tree-structure"
|
|
254
298
|
:scroll-top="mainView?.scrollTop || 0"
|
|
255
299
|
closable
|
|
256
|
-
:border-radius="
|
|
300
|
+
:border-radius="shownViews.length > 0 ? '0' : `0 ${PANEL_RADIUS} ${PANEL_RADIUS} 0`"
|
|
257
301
|
:border-left="false"
|
|
258
302
|
@close="treeviewStore.closeView('main')"
|
|
259
303
|
@update:scroll-top="mainView && treeviewStore.setScrollTop(mainView.id, $event)"
|
|
@@ -263,34 +307,34 @@ function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
|
263
307
|
</div>
|
|
264
308
|
|
|
265
309
|
<div
|
|
266
|
-
v-if="mainView &&
|
|
310
|
+
v-if="mainView && shownViews.length > 0"
|
|
267
311
|
class="column-separator"
|
|
268
312
|
@mousedown="onResizeStart"
|
|
269
313
|
/>
|
|
270
314
|
|
|
271
315
|
<div
|
|
272
|
-
v-if="
|
|
316
|
+
v-if="shownViews.length > 0"
|
|
273
317
|
class="column additional-column"
|
|
274
318
|
:style="{
|
|
275
319
|
width: `${treeviewStore.additionalPanelWidth}px`,
|
|
276
320
|
}"
|
|
277
321
|
>
|
|
278
|
-
<template v-for="(view, index) in
|
|
322
|
+
<template v-for="(view, index) in shownViews" :key="view.id">
|
|
279
323
|
<div
|
|
280
324
|
class="view-wrapper"
|
|
281
325
|
:class="{
|
|
282
|
-
'drag-over':
|
|
326
|
+
'drag-over': draggedId !== undefined && draggedId !== view.id,
|
|
283
327
|
}"
|
|
284
328
|
:style="{ flex: `0 0 ${rowHeights[index]}%` }"
|
|
285
329
|
@dragover="onDragOver"
|
|
286
|
-
@drop="onDrop(
|
|
330
|
+
@drop="onDrop(view.id)"
|
|
287
331
|
>
|
|
288
332
|
<ViewerObjectTreeBox
|
|
289
333
|
:title="view.title"
|
|
290
334
|
:icon="view.geode_object_type ? geodeObjectImage(view.geode_object_type) : undefined"
|
|
291
335
|
:scroll-top="view.scrollTop"
|
|
292
336
|
closable
|
|
293
|
-
:border-radius="`0 ${index === 0 ? PANEL_RADIUS : '0'} ${index ===
|
|
337
|
+
:border-radius="`0 ${index === 0 ? PANEL_RADIUS : '0'} ${index === shownViews.length - 1 ? PANEL_RADIUS : '0'} 0`"
|
|
294
338
|
:border-left="false"
|
|
295
339
|
:accent="
|
|
296
340
|
view.color
|
|
@@ -298,7 +342,8 @@ function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
|
298
342
|
: undefined
|
|
299
343
|
"
|
|
300
344
|
@close="treeviewStore.closeView(view.id)"
|
|
301
|
-
@dragstart="onDragStart(
|
|
345
|
+
@dragstart="onDragStart(view.id)"
|
|
346
|
+
@dragend="onDragEnd"
|
|
302
347
|
@update:scroll-top="treeviewStore.setScrollTop(view.id, $event)"
|
|
303
348
|
@header-enter="onModelHeaderEnter(view.id)"
|
|
304
349
|
@header-leave="onModelHeaderLeave(view.id)"
|
|
@@ -322,17 +367,17 @@ function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
|
322
367
|
</ViewerObjectTreeBox>
|
|
323
368
|
</div>
|
|
324
369
|
<div
|
|
325
|
-
v-if="index <
|
|
370
|
+
v-if="index < shownViews.length - 1"
|
|
326
371
|
class="v-split-resizer"
|
|
327
372
|
@mousedown="onVerticalResizeStart($event, index)"
|
|
328
373
|
/>
|
|
329
374
|
</template>
|
|
330
375
|
</div>
|
|
331
376
|
<div
|
|
332
|
-
v-if="
|
|
377
|
+
v-if="mainView || shownViews.length > 0"
|
|
333
378
|
class="total-resizer"
|
|
334
379
|
@mousedown="
|
|
335
|
-
|
|
380
|
+
shownViews.length > 0
|
|
336
381
|
? onAdditionalResizeStart($event)
|
|
337
382
|
: mainView
|
|
338
383
|
? onResizeStart($event)
|
|
@@ -378,10 +423,21 @@ function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
|
378
423
|
content: "";
|
|
379
424
|
position: absolute;
|
|
380
425
|
inset: 0;
|
|
381
|
-
/* Adaptive glass: apps can tint it (an "r, g, b" triplet)
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
426
|
+
/* Adaptive glass: apps can tint it (an "r, g, b" triplet), change its blending and set a minimum opacity, per
|
|
427
|
+
theme (the radial menu's one) */
|
|
428
|
+
background: rgba(
|
|
429
|
+
var(--ogw-viewer-glass-tint, 255, 255, 255),
|
|
430
|
+
max(var(--adaptive-opacity), var(--ogw-viewer-glass-min-opacity, 0))
|
|
431
|
+
);
|
|
432
|
+
/* Apps can replace the adaptive blur and dimming of the backdrop, "none" keeps it sharp */
|
|
433
|
+
backdrop-filter: var(
|
|
434
|
+
--ogw-viewer-glass-backdrop,
|
|
435
|
+
blur(var(--adaptive-blur)) brightness(var(--adaptive-brightness))
|
|
436
|
+
);
|
|
437
|
+
-webkit-backdrop-filter: var(
|
|
438
|
+
--ogw-viewer-glass-backdrop,
|
|
439
|
+
blur(var(--adaptive-blur)) brightness(var(--adaptive-brightness))
|
|
440
|
+
);
|
|
385
441
|
mix-blend-mode: var(--ogw-viewer-glass-blend, lighten);
|
|
386
442
|
z-index: 0;
|
|
387
443
|
pointer-events: none;
|
|
@@ -396,6 +452,79 @@ function onVerticalResizeStart(event: MouseEvent, index: number): void {
|
|
|
396
452
|
z-index: 1;
|
|
397
453
|
}
|
|
398
454
|
|
|
455
|
+
.activity-bar-separator {
|
|
456
|
+
width: 24px;
|
|
457
|
+
height: 1px;
|
|
458
|
+
margin-bottom: 6px;
|
|
459
|
+
flex-shrink: 0;
|
|
460
|
+
background-color: rgba(var(--v-border-color), var(--v-border-opacity));
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.model-tree-toggle-all {
|
|
464
|
+
margin-bottom: 2px;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/* A model tree button: the model type icon, marked with the color of its tree, faded while collapsed */
|
|
468
|
+
.model-tree-toggle {
|
|
469
|
+
display: flex;
|
|
470
|
+
justify-content: center;
|
|
471
|
+
width: 100%;
|
|
472
|
+
margin-bottom: 2px;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.model-tree-toggle::before {
|
|
476
|
+
content: "";
|
|
477
|
+
position: absolute;
|
|
478
|
+
left: 0;
|
|
479
|
+
top: 10px;
|
|
480
|
+
bottom: 10px;
|
|
481
|
+
width: 3px;
|
|
482
|
+
border-radius: 0 2px 2px 0;
|
|
483
|
+
background-color: var(--model-tree-color, transparent);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.model-tree-toggle .v-btn {
|
|
487
|
+
background-color: rgba(var(--v-theme-on-surface), 0.08);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/* Where a dragged model button lands */
|
|
491
|
+
.model-tree-toggle.drop-before::after,
|
|
492
|
+
.model-tree-toggle.drop-after::after {
|
|
493
|
+
content: "";
|
|
494
|
+
position: absolute;
|
|
495
|
+
left: 8px;
|
|
496
|
+
right: 8px;
|
|
497
|
+
height: 2px;
|
|
498
|
+
border-radius: 1px;
|
|
499
|
+
background-color: rgb(var(--v-theme-primary));
|
|
500
|
+
pointer-events: none;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.model-tree-toggle.drop-before::after {
|
|
504
|
+
top: -2px;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.model-tree-toggle.drop-after::after {
|
|
508
|
+
bottom: -2px;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.model-tree-toggle.is-collapsed::before {
|
|
512
|
+
opacity: 0.5;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.model-tree-toggle.is-collapsed .v-btn {
|
|
516
|
+
background-color: transparent;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.model-tree-toggle.is-collapsed :deep(.v-btn__content) {
|
|
520
|
+
opacity: 0.55;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.model-tree-toggle-icon {
|
|
524
|
+
flex: 0 0 auto;
|
|
525
|
+
filter: var(--ogw-mono-icon-filter, brightness(0));
|
|
526
|
+
}
|
|
527
|
+
|
|
399
528
|
.treeview-container {
|
|
400
529
|
height: 100%;
|
|
401
530
|
width: max-content;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
// oxlint-disable max-dependencies
|
|
2
|
+
// oxlint-disable max-dependencies, eslint/max-lines
|
|
3
3
|
import type { GeodeObjectTyped, ViewerObjectTyped } from "@ogw_front/types/identifiers";
|
|
4
4
|
import {
|
|
5
5
|
type MapStyle,
|
|
@@ -11,8 +11,10 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
type TreeMenuPayload,
|
|
13
13
|
compareSelections,
|
|
14
|
+
isObjectTreeRowViewable,
|
|
14
15
|
withPendingImports,
|
|
15
16
|
} from "@ogw_front/utils/treeview";
|
|
17
|
+
import { isImage, isModel } from "@ogw_front/utils/viewer_object_type";
|
|
16
18
|
import CommonTreeView from "@ogw_front/components/Viewer/ObjectTree/Base/CommonTreeView.vue";
|
|
17
19
|
import type { DisplayItem } from "@ogw_front/composables/virtual_tree";
|
|
18
20
|
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
@@ -168,14 +170,6 @@ const linkedRow = computed<{ id: string; color: string } | undefined>(() => {
|
|
|
168
170
|
return { id, color };
|
|
169
171
|
});
|
|
170
172
|
|
|
171
|
-
function isModel(item: TreeGroupItem): boolean {
|
|
172
|
-
const actualItem = item.raw || item;
|
|
173
|
-
return (
|
|
174
|
-
actualItem.viewer_object_type === "model" ||
|
|
175
|
-
["BRep", "Section"].includes(actualItem.geode_object_type ?? "")
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
173
|
function handleHoverEnter({
|
|
180
174
|
item,
|
|
181
175
|
immediate = false,
|
|
@@ -186,31 +180,31 @@ function handleHoverEnter({
|
|
|
186
180
|
const actualItem = item.raw || item;
|
|
187
181
|
|
|
188
182
|
// Images are not pickable: the viewer has nothing to highlight
|
|
189
|
-
if (!actualItem.viewer_object_type || actualItem
|
|
183
|
+
if (!actualItem.viewer_object_type || isImage(actualItem)) {
|
|
190
184
|
return;
|
|
191
185
|
}
|
|
192
186
|
|
|
193
|
-
const
|
|
194
|
-
if (
|
|
187
|
+
const itemIsModel = isModel(actualItem);
|
|
188
|
+
if (itemIsModel) {
|
|
195
189
|
treeviewStore.setHoveredModel(actualItem.id);
|
|
196
190
|
}
|
|
197
191
|
|
|
198
192
|
onHoverEnter(
|
|
199
193
|
actualItem.id,
|
|
200
194
|
async () => {
|
|
201
|
-
if (
|
|
195
|
+
if (itemIsModel) {
|
|
202
196
|
return await dataStore.getAllModelComponentsViewerIds(actualItem.id);
|
|
203
197
|
}
|
|
204
198
|
return [];
|
|
205
199
|
},
|
|
206
|
-
|
|
200
|
+
itemIsModel ? "model" : "mesh",
|
|
207
201
|
immediate,
|
|
208
202
|
);
|
|
209
203
|
}
|
|
210
204
|
|
|
211
205
|
function handleHoverLeave({ item }: { item: TreeGroupItem }): void {
|
|
212
206
|
const actualItem = item.raw || item;
|
|
213
|
-
if (!actualItem.viewer_object_type || actualItem
|
|
207
|
+
if (!actualItem.viewer_object_type || isImage(actualItem)) {
|
|
214
208
|
return;
|
|
215
209
|
}
|
|
216
210
|
if (treeviewStore.hoveredModelId === actualItem.id) {
|
|
@@ -259,6 +253,7 @@ function expandAll(): void {
|
|
|
259
253
|
}"
|
|
260
254
|
:scroll-top="mainView?.scrollTop || 0"
|
|
261
255
|
:linked="linkedRow"
|
|
256
|
+
:is-row-viewable="(row) => isObjectTreeRowViewable(row, dataStore.isViewable)"
|
|
262
257
|
class="transparent-treeview virtual-tree-height"
|
|
263
258
|
@update:selected="(val) => onUpdateSelection(val as string[])"
|
|
264
259
|
@update:scroll-top="treeviewStore.setScrollTop(mainView?.id ?? '', $event)"
|
|
@@ -6,6 +6,7 @@ import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
|
6
6
|
import type { ModelComponentMenuPayload } from "@ogw_front/utils/treeview";
|
|
7
7
|
import ObjectTreeControls from "@ogw_front/components/Viewer/ObjectTree/Base/Controls.vue";
|
|
8
8
|
import ObjectTreeItemLabel from "@ogw_front/components/Viewer/ObjectTree/Base/ItemLabel.vue";
|
|
9
|
+
import { useDataStore } from "@ogw_front/stores/data";
|
|
9
10
|
import { useHoverhighlight } from "@ogw_front/composables/hover_highlight";
|
|
10
11
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
11
12
|
import { useModelTree } from "@ogw_front/composables/model_tree";
|
|
@@ -36,6 +37,7 @@ interface Emits {
|
|
|
36
37
|
const emit = defineEmits<Emits>();
|
|
37
38
|
|
|
38
39
|
const treeviewStore = useTreeviewStore();
|
|
40
|
+
const dataStore = useDataStore();
|
|
39
41
|
|
|
40
42
|
const {
|
|
41
43
|
isLoading,
|
|
@@ -241,6 +243,7 @@ function getLeafViewerIds(item: CollectionTreeItem): number[] {
|
|
|
241
243
|
}"
|
|
242
244
|
:scroll-top="currentView?.scrollTop || 0"
|
|
243
245
|
class="transparent-treeview virtual-tree-height"
|
|
246
|
+
:is-row-viewable="() => dataStore.isViewable(id)"
|
|
244
247
|
@update:selected="(val) => onUpdateSelection(val as string[])"
|
|
245
248
|
@update:scroll-top="treeviewStore.setScrollTop(id, $event)"
|
|
246
249
|
@hover:enter="
|
|
@@ -5,11 +5,10 @@ import {
|
|
|
5
5
|
applyRangesPerData,
|
|
6
6
|
useBatchStyle,
|
|
7
7
|
} from "@ogw_front/composables/batch_style";
|
|
8
|
-
import
|
|
9
|
-
type ItemProps,
|
|
10
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
8
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
11
9
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
12
10
|
import PointSetPoints from "@ogw_front/assets/viewer_svgs/point_set_points.svg";
|
|
11
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
13
12
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
14
13
|
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size.vue";
|
|
15
14
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
@@ -21,77 +20,76 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
21
20
|
const { applyBatchStyle } = useBatchStyle();
|
|
22
21
|
|
|
23
22
|
interface Props {
|
|
24
|
-
|
|
23
|
+
dataId: DataId;
|
|
24
|
+
index: number;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const {
|
|
28
|
-
|
|
29
|
-
const dataId = toRef(() => itemProps.id);
|
|
27
|
+
const { dataId, index } = defineProps<Props>();
|
|
30
28
|
|
|
31
29
|
const visibility = computed({
|
|
32
|
-
get: () => dataStyleStore.meshPointsVisibility(dataId
|
|
30
|
+
get: () => dataStyleStore.meshPointsVisibility(dataId),
|
|
33
31
|
set: async (newValue) => {
|
|
34
32
|
if (newValue === undefined) {
|
|
35
33
|
return;
|
|
36
34
|
}
|
|
37
|
-
await applyBatchStyle(dataId
|
|
35
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
38
36
|
dataStyleStore.setMeshPointsVisibility(meshId, newValue),
|
|
39
37
|
);
|
|
40
38
|
hybridViewerStore.remoteRender();
|
|
41
39
|
},
|
|
42
40
|
});
|
|
43
41
|
const size = computed({
|
|
44
|
-
get: () => dataStyleStore.meshPointsSize(dataId
|
|
42
|
+
get: () => dataStyleStore.meshPointsSize(dataId),
|
|
45
43
|
set: async (newValue) => {
|
|
46
44
|
if (newValue === undefined) {
|
|
47
45
|
return;
|
|
48
46
|
}
|
|
49
|
-
await applyBatchStyle(dataId
|
|
47
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
50
48
|
dataStyleStore.setMeshPointsSize(meshId, newValue),
|
|
51
49
|
);
|
|
52
50
|
hybridViewerStore.remoteRender();
|
|
53
51
|
},
|
|
54
52
|
});
|
|
55
53
|
const coloring_style_key = computed({
|
|
56
|
-
get: () => dataStyleStore.meshPointsActiveColoring(dataId
|
|
54
|
+
get: () => dataStyleStore.meshPointsActiveColoring(dataId),
|
|
57
55
|
set: async (newValue) => {
|
|
58
|
-
await applyBatchStyle(dataId
|
|
56
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
59
57
|
dataStyleStore.setMeshPointsActiveColoring(meshId, newValue),
|
|
60
58
|
);
|
|
61
59
|
hybridViewerStore.remoteRender();
|
|
62
60
|
},
|
|
63
61
|
});
|
|
64
62
|
const color = computed<ColorRGBA | undefined>({
|
|
65
|
-
get: () => dataStyleStore.meshPointsColor(dataId
|
|
63
|
+
get: () => dataStyleStore.meshPointsColor(dataId) as ColorRGBA | undefined,
|
|
66
64
|
set: async (newValue) => {
|
|
67
65
|
if (newValue === undefined) {
|
|
68
66
|
return;
|
|
69
67
|
}
|
|
70
|
-
await applyBatchStyle(dataId
|
|
68
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
71
69
|
dataStyleStore.setMeshPointsColor(meshId, newValue),
|
|
72
70
|
);
|
|
73
71
|
hybridViewerStore.remoteRender();
|
|
74
72
|
},
|
|
75
73
|
});
|
|
76
74
|
const opacity = computed<Opacity | undefined>({
|
|
77
|
-
get: () => dataStyleStore.meshPointsOpacity(dataId
|
|
75
|
+
get: () => dataStyleStore.meshPointsOpacity(dataId),
|
|
78
76
|
set: async (newValue) => {
|
|
79
77
|
if (newValue === undefined) {
|
|
80
78
|
return;
|
|
81
79
|
}
|
|
82
|
-
await applyBatchStyle(dataId
|
|
80
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
83
81
|
dataStyleStore.setMeshPointsOpacity(meshId, newValue),
|
|
84
82
|
);
|
|
85
83
|
hybridViewerStore.remoteRender();
|
|
86
84
|
},
|
|
87
85
|
});
|
|
88
86
|
const vertex_attribute_name = computed({
|
|
89
|
-
get: () => dataStyleStore.meshPointsVertexAttributeName(dataId
|
|
87
|
+
get: () => dataStyleStore.meshPointsVertexAttributeName(dataId),
|
|
90
88
|
set: async (newValue) => {
|
|
91
89
|
if (newValue === undefined) {
|
|
92
90
|
return;
|
|
93
91
|
}
|
|
94
|
-
await applyBatchStyle(dataId
|
|
92
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
95
93
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(meshId, newValue)),
|
|
96
94
|
);
|
|
97
95
|
hybridViewerStore.remoteRender();
|
|
@@ -99,52 +97,52 @@ const vertex_attribute_name = computed({
|
|
|
99
97
|
});
|
|
100
98
|
|
|
101
99
|
const vertex_attribute_time_step = computed({
|
|
102
|
-
get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId
|
|
100
|
+
get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId),
|
|
103
101
|
set: async (newValue) => {
|
|
104
102
|
if (newValue === undefined) {
|
|
105
103
|
return;
|
|
106
104
|
}
|
|
107
|
-
await applyBatchStyle(dataId
|
|
105
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
108
106
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(meshId, newValue)),
|
|
109
107
|
);
|
|
110
108
|
hybridViewerStore.remoteRender();
|
|
111
109
|
},
|
|
112
110
|
});
|
|
113
111
|
const vertex_attribute_item = computed({
|
|
114
|
-
get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId
|
|
112
|
+
get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId),
|
|
115
113
|
set: async (newValue) => {
|
|
116
|
-
await applyBatchStyle(dataId
|
|
114
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
117
115
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(meshId, newValue)),
|
|
118
116
|
);
|
|
119
117
|
hybridViewerStore.remoteRender();
|
|
120
118
|
},
|
|
121
119
|
});
|
|
122
120
|
const vertex_attribute_range = computed({
|
|
123
|
-
get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId
|
|
121
|
+
get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId),
|
|
124
122
|
set: async (newValue) => {
|
|
125
123
|
const [minimum, maximum] = newValue;
|
|
126
124
|
if (minimum === undefined || maximum === undefined) {
|
|
127
125
|
return;
|
|
128
126
|
}
|
|
129
|
-
await applyBatchStyle(dataId
|
|
127
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
130
128
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum)),
|
|
131
129
|
);
|
|
132
130
|
hybridViewerStore.remoteRender();
|
|
133
131
|
},
|
|
134
132
|
});
|
|
135
133
|
const vertex_attribute_color_map = computed({
|
|
136
|
-
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId
|
|
134
|
+
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId),
|
|
137
135
|
set: async (newValue) => {
|
|
138
|
-
await applyBatchStyle(dataId
|
|
136
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
139
137
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(meshId, newValue)),
|
|
140
138
|
);
|
|
141
139
|
hybridViewerStore.remoteRender();
|
|
142
140
|
},
|
|
143
141
|
});
|
|
144
142
|
const vertex_attribute_no_data_color = computed<ColorRGBA>({
|
|
145
|
-
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId
|
|
143
|
+
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId),
|
|
146
144
|
set: async (newValue) => {
|
|
147
|
-
await applyBatchStyle(dataId
|
|
145
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
148
146
|
dataStyleStore.setMeshPointsVertexAttributeNoDataColor(meshId, newValue),
|
|
149
147
|
);
|
|
150
148
|
hybridViewerStore.remoteRender();
|
|
@@ -161,8 +159,7 @@ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<v
|
|
|
161
159
|
<template>
|
|
162
160
|
<ViewerContextMenuItem
|
|
163
161
|
data-testid="meshPointsMenu"
|
|
164
|
-
:index="
|
|
165
|
-
:itemProps="itemProps"
|
|
162
|
+
:index="index"
|
|
166
163
|
:btnImage="PointSetPoints"
|
|
167
164
|
tooltip="Points options"
|
|
168
165
|
>
|