@geode/opengeodeweb-front 12.2.0-rc.4 → 12.2.0-rc.6
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/components/CameraOrientation.vue +85 -68
- package/app/components/CameraOrientationDial.vue +195 -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 +5 -0
- package/app/components/Viewer/ObjectTree/Base/ComponentRelations.vue +2 -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/Views/GlobalObjects.vue +10 -15
- package/app/components/Viewer/ObjectTree/Views/ModelTree.vue +3 -0
- package/app/components/Viewer/OrientationCompass.vue +11 -34
- package/app/components/Viewer/OrientationGlobe.vue +2 -2
- 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/compass_dial.ts +40 -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/project_manager_helpers/types.ts +2 -3
- package/app/composables/use_overlapping_picker.ts +7 -19
- package/app/composables/viewer_context_menu.ts +2 -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 +12 -31
- 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/brand_colors.ts +9 -0
- package/app/utils/camera_orientations.ts +136 -0
- package/app/utils/import_item.ts +5 -4
- package/app/utils/orientation_compass.ts +15 -0
- package/app/utils/orientation_cube_style.ts +70 -0
- 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/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/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
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { cameraViewBasis, toCameraPose } from "@ogw_front/utils/orientation_gizmo";
|
|
3
2
|
import {
|
|
3
|
+
COMPASS_TICK_ANGLES,
|
|
4
|
+
QUARTER_TURN,
|
|
4
5
|
compassDialPoint,
|
|
5
|
-
compassHeading,
|
|
6
|
-
compassTilt,
|
|
7
6
|
facingCameraPose,
|
|
7
|
+
isCardinalAngle,
|
|
8
8
|
isFacing,
|
|
9
9
|
} from "@ogw_front/utils/orientation_compass";
|
|
10
|
+
import { BRAND_ORANGE } from "@ogw_front/utils/brand_colors";
|
|
10
11
|
import type { CameraOptions } from "@ogw_internal/stores/hybrid_viewer/vtk_types";
|
|
12
|
+
import { toCameraPose } from "@ogw_front/utils/orientation_gizmo";
|
|
13
|
+
import { useCompassDial } from "@ogw_front/composables/compass_dial";
|
|
11
14
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
12
15
|
|
|
13
16
|
// Compass in the app theme: the dial turns with the camera heading (north = world +Y) and flattens
|
|
@@ -26,13 +29,6 @@ const LETTER_HIT_RADIUS = 9;
|
|
|
26
29
|
const NEEDLE_LENGTH = 18;
|
|
27
30
|
const NEEDLE_HALF_WIDTH = 3.5;
|
|
28
31
|
const HUB_RADIUS = 2.5;
|
|
29
|
-
const TICK_STEP = 30;
|
|
30
|
-
const QUARTER_TURN = 90;
|
|
31
|
-
const FULL_TURN = 360;
|
|
32
|
-
const TICK_ANGLES = Array.from(
|
|
33
|
-
{ length: FULL_TURN / TICK_STEP },
|
|
34
|
-
(_item, index) => index * TICK_STEP,
|
|
35
|
-
);
|
|
36
32
|
const NORTH = 0;
|
|
37
33
|
const LETTERS = [
|
|
38
34
|
{ label: "N", name: "north", angle: NORTH },
|
|
@@ -44,26 +40,7 @@ const NORTH_NEEDLE = `M0 ${-NEEDLE_LENGTH} L${NEEDLE_HALF_WIDTH} 0 L${-NEEDLE_HA
|
|
|
44
40
|
const SOUTH_NEEDLE = `M0 ${NEEDLE_LENGTH} L${NEEDLE_HALF_WIDTH} 0 L${-NEEDLE_HALF_WIDTH} 0 Z`;
|
|
45
41
|
|
|
46
42
|
const hybridViewerStore = useHybridViewerStore();
|
|
47
|
-
|
|
48
|
-
const basis = computed(() => {
|
|
49
|
-
const pose = toCameraPose(hybridViewerStore.camera_options);
|
|
50
|
-
return pose && cameraViewBasis(pose);
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
// The last readable heading is kept while the camera is rolled until no heading can be read
|
|
54
|
-
const heading = ref(0);
|
|
55
|
-
const tilt = ref(1);
|
|
56
|
-
watch(
|
|
57
|
-
basis,
|
|
58
|
-
(value) => {
|
|
59
|
-
if (!value) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
heading.value = compassHeading(value) ?? heading.value;
|
|
63
|
-
tilt.value = compassTilt(value);
|
|
64
|
-
},
|
|
65
|
-
{ immediate: true },
|
|
66
|
-
);
|
|
43
|
+
const { basis, heading, tilt } = useCompassDial();
|
|
67
44
|
|
|
68
45
|
const dialTransform = computed(() => `scale(1 ${tilt.value}) rotate(${-heading.value})`);
|
|
69
46
|
const letters = computed(() =>
|
|
@@ -74,7 +51,7 @@ const letters = computed(() =>
|
|
|
74
51
|
);
|
|
75
52
|
|
|
76
53
|
function tickInnerRadius(angle: number): number {
|
|
77
|
-
return angle
|
|
54
|
+
return isCardinalAngle(angle) ? CARDINAL_TICK_INNER_RADIUS : TICK_INNER_RADIUS;
|
|
78
55
|
}
|
|
79
56
|
|
|
80
57
|
function face(targetHeading: number): void {
|
|
@@ -116,7 +93,7 @@ function face(targetHeading: number): void {
|
|
|
116
93
|
>
|
|
117
94
|
<g :transform="dialTransform">
|
|
118
95
|
<line
|
|
119
|
-
v-for="angle in
|
|
96
|
+
v-for="angle in COMPASS_TICK_ANGLES"
|
|
120
97
|
:key="angle"
|
|
121
98
|
class="tick"
|
|
122
99
|
:y1="-tickInnerRadius(angle)"
|
|
@@ -182,7 +159,7 @@ function face(targetHeading: number): void {
|
|
|
182
159
|
}
|
|
183
160
|
|
|
184
161
|
.needle-north {
|
|
185
|
-
fill:
|
|
162
|
+
fill: v-bind(BRAND_ORANGE);
|
|
186
163
|
}
|
|
187
164
|
|
|
188
165
|
.needle-south {
|
|
@@ -217,7 +194,7 @@ function face(targetHeading: number): void {
|
|
|
217
194
|
}
|
|
218
195
|
|
|
219
196
|
.letter.north {
|
|
220
|
-
fill:
|
|
197
|
+
fill: v-bind(BRAND_ORANGE);
|
|
221
198
|
font-weight: 600;
|
|
222
199
|
}
|
|
223
200
|
</style>
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
strataRings,
|
|
9
9
|
} from "@ogw_front/utils/orientation_globe";
|
|
10
10
|
import { cameraViewBasis, toCameraPose } from "@ogw_front/utils/orientation_gizmo";
|
|
11
|
+
import { BRAND_ORANGE } from "@ogw_front/utils/brand_colors";
|
|
11
12
|
import { compassHeading } from "@ogw_front/utils/orientation_compass";
|
|
12
13
|
import { strataPixels } from "@ogw_front/utils/orientation_strata";
|
|
13
14
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -35,7 +36,6 @@ const LIGHT_INK_LUMINANCE = 0.5;
|
|
|
35
36
|
const LUMINANCE_WEIGHTS = { red: 0.2126, green: 0.7152, blue: 0.0722 } as const;
|
|
36
37
|
const MAX_CHANNEL = 255;
|
|
37
38
|
const AXIS_COLORS = { x: "#D9553B", y: "#3F8F63", z: "#3567B5" } as const;
|
|
38
|
-
const ORANGE = "#F48830";
|
|
39
39
|
|
|
40
40
|
const hybridViewerStore = useHybridViewerStore();
|
|
41
41
|
const dataStyleStore = useDataStyleStore();
|
|
@@ -320,7 +320,7 @@ svg {
|
|
|
320
320
|
}
|
|
321
321
|
|
|
322
322
|
.north {
|
|
323
|
-
fill: v-bind(
|
|
323
|
+
fill: v-bind(BRAND_ORANGE);
|
|
324
324
|
stroke: #e8eef0;
|
|
325
325
|
stroke-width: 1.5px;
|
|
326
326
|
pointer-events: none;
|
|
@@ -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
|
>
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import ViewerContextMenuItem, {
|
|
3
|
-
type ItemProps,
|
|
4
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
2
|
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
6
4
|
import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
|
|
7
5
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
6
|
|
|
9
7
|
interface Props {
|
|
10
|
-
|
|
8
|
+
index: number;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
const {
|
|
11
|
+
const { index } = defineProps<Props>();
|
|
14
12
|
|
|
15
13
|
const dataStyleStore = useDataStyleStore();
|
|
16
14
|
|
|
@@ -25,8 +23,7 @@ const backgroundColor = computed<ColorRGBA>({
|
|
|
25
23
|
<template>
|
|
26
24
|
<ViewerContextMenuItem
|
|
27
25
|
data-testid="sceneBackgroundMenu"
|
|
28
|
-
:index="
|
|
29
|
-
:itemProps="itemProps"
|
|
26
|
+
:index="index"
|
|
30
27
|
tooltip="Background"
|
|
31
28
|
btnIcon="ph-image"
|
|
32
29
|
>
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import ViewerContextMenuItem, {
|
|
3
|
-
type ItemProps,
|
|
4
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
2
|
import type { SceneOrientationWidget } from "@ogw_internal/stores/data_style/types";
|
|
3
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
6
4
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
5
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
6
|
|
|
9
7
|
interface Props {
|
|
10
|
-
|
|
8
|
+
index: number;
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
const {
|
|
11
|
+
const { index } = defineProps<Props>();
|
|
14
12
|
|
|
15
13
|
const dataStyleStore = useDataStyleStore();
|
|
16
14
|
const hybridViewerStore = useHybridViewerStore();
|
|
@@ -27,8 +25,7 @@ const orientationWidget = computed<SceneOrientationWidget>({
|
|
|
27
25
|
<template>
|
|
28
26
|
<ViewerContextMenuItem
|
|
29
27
|
data-testid="sceneOrientationWidgetMenu"
|
|
30
|
-
:index="
|
|
31
|
-
:itemProps="itemProps"
|
|
28
|
+
:index="index"
|
|
32
29
|
tooltip="Orientation widget"
|
|
33
30
|
btnIcon="ph-compass"
|
|
34
31
|
>
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import ViewerContextMenuItem, {
|
|
3
|
-
type ItemProps,
|
|
4
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
2
|
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
6
3
|
import type { SceneFontFamily } from "@ogw_internal/stores/data_style/types";
|
|
4
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
7
5
|
import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
|
|
8
6
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
9
7
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
10
8
|
|
|
11
9
|
interface Props {
|
|
12
|
-
|
|
10
|
+
index: number;
|
|
13
11
|
}
|
|
14
12
|
|
|
15
|
-
const {
|
|
13
|
+
const { index } = defineProps<Props>();
|
|
16
14
|
|
|
17
15
|
const dataStyleStore = useDataStyleStore();
|
|
18
16
|
const hybridViewerStore = useHybridViewerStore();
|
|
@@ -43,8 +41,7 @@ const fontFamily = computed<SceneFontFamily>({
|
|
|
43
41
|
<template>
|
|
44
42
|
<ViewerContextMenuItem
|
|
45
43
|
data-testid="sceneTextMenu"
|
|
46
|
-
:index="
|
|
47
|
-
:itemProps="itemProps"
|
|
44
|
+
:index="index"
|
|
48
45
|
tooltip="Text"
|
|
49
46
|
btnIcon="ph-text-aa"
|
|
50
47
|
>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
3
3
|
import SolidEdges from "@ogw_front/assets/viewer_svgs/solid_edges.svg";
|
|
4
4
|
import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions.vue";
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
7
|
+
dataId: DataId;
|
|
8
|
+
index: number;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const {
|
|
11
|
+
const { dataId, index } = defineProps<Props>();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
15
|
<ViewerGenericMeshEdgesOptions
|
|
15
|
-
:
|
|
16
|
+
:data-id="dataId"
|
|
17
|
+
:index="index"
|
|
16
18
|
:btnImage="SolidEdges"
|
|
17
19
|
:capabilities="{ edge: { available: false } }"
|
|
18
20
|
/>
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
3
3
|
import SolidPoints from "@ogw_front/assets/viewer_svgs/solid_points.svg";
|
|
4
4
|
import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions.vue";
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
7
|
+
dataId: DataId;
|
|
8
|
+
index: number;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const {
|
|
11
|
+
const { dataId, index } = defineProps<Props>();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
|
-
<ViewerGenericMeshPointsOptions :
|
|
15
|
+
<ViewerGenericMeshPointsOptions :data-id="dataId" :index="index" :btnImage="SolidPoints" />
|
|
15
16
|
</template>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
3
3
|
import SolidFacets from "@ogw_front/assets/viewer_svgs/solid_facets.svg";
|
|
4
4
|
import ViewerGenericMeshPolygonsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsOptions.vue";
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
7
|
+
dataId: DataId;
|
|
8
|
+
index: number;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const {
|
|
11
|
+
const { dataId, index } = defineProps<Props>();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
15
|
<ViewerGenericMeshPolygonsOptions
|
|
15
|
-
:
|
|
16
|
+
:data-id="dataId"
|
|
17
|
+
:index="index"
|
|
16
18
|
:btnImage="SolidFacets"
|
|
17
19
|
:capabilities="{ textures: { available: false } }"
|
|
18
20
|
/>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
3
|
-
type ItemProps,
|
|
4
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
5
3
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
6
4
|
import SolidPolyhedra from "@ogw_front/assets/viewer_svgs/solid_polyhedra.svg";
|
|
5
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
7
6
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
7
|
import ViewerSolidSpecificPolyhedraColoring from "@ogw_front/components/Viewer/Solid/SpecificPolyhedraColoring.vue";
|
|
9
8
|
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
@@ -16,18 +15,17 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
16
15
|
const { applyBatchStyle } = useBatchStyle();
|
|
17
16
|
|
|
18
17
|
interface Props {
|
|
19
|
-
|
|
18
|
+
dataId: DataId;
|
|
19
|
+
index: number;
|
|
20
20
|
tooltip?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
const dataId = toRef(() => itemProps.id);
|
|
23
|
+
const { dataId, index, tooltip = "Polyhedra options" } = defineProps<Props>();
|
|
26
24
|
|
|
27
25
|
const visibility = computed<Visibility>({
|
|
28
|
-
get: () => dataStyleStore.meshPolyhedraVisibility(dataId
|
|
26
|
+
get: () => dataStyleStore.meshPolyhedraVisibility(dataId),
|
|
29
27
|
set: async (newValue) => {
|
|
30
|
-
await applyBatchStyle(dataId
|
|
28
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
31
29
|
dataStyleStore.setMeshPolyhedraVisibility(meshId, newValue),
|
|
32
30
|
);
|
|
33
31
|
hybridViewerStore.remoteRender();
|
|
@@ -38,8 +36,7 @@ const visibility = computed<Visibility>({
|
|
|
38
36
|
<template>
|
|
39
37
|
<ViewerContextMenuItem
|
|
40
38
|
data-testid="meshPolyhedraMenu"
|
|
41
|
-
:index="
|
|
42
|
-
:itemProps="itemProps"
|
|
39
|
+
:index="index"
|
|
43
40
|
:tooltip="tooltip"
|
|
44
41
|
:btnImage="SolidPolyhedra"
|
|
45
42
|
>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
3
3
|
import SurfaceEdges from "@ogw_front/assets/viewer_svgs/surface_edges.svg";
|
|
4
4
|
import ViewerGenericMeshEdgesOptions from "@ogw_front/components/Viewer/Generic/Mesh/EdgesOptions.vue";
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
7
|
+
dataId: DataId;
|
|
8
|
+
index: number;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const {
|
|
11
|
+
const { dataId, index } = defineProps<Props>();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
15
|
<ViewerGenericMeshEdgesOptions
|
|
15
|
-
:
|
|
16
|
+
:data-id="dataId"
|
|
17
|
+
:index="index"
|
|
16
18
|
:btnImage="SurfaceEdges"
|
|
17
19
|
:capabilities="{ edge: { available: false } }"
|
|
18
20
|
/>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
3
3
|
import TriangulatedSurfaceEdgesPoints from "@ogw_front/assets/viewer_svgs/surface_points.svg";
|
|
4
4
|
import ViewerGenericMeshPointsOptions from "@ogw_front/components/Viewer/Generic/Mesh/PointsOptions.vue";
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
7
|
+
dataId: DataId;
|
|
8
|
+
index: number;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const {
|
|
11
|
+
const { dataId, index } = defineProps<Props>();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
15
|
<ViewerGenericMeshPointsOptions
|
|
15
|
-
:
|
|
16
|
+
:data-id="dataId"
|
|
17
|
+
:index="index"
|
|
16
18
|
:btnImage="TriangulatedSurfaceEdgesPoints"
|
|
17
19
|
/>
|
|
18
20
|
</template>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import
|
|
3
|
-
type ItemProps,
|
|
4
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
5
3
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
6
4
|
import PolygonalSurfacePolygons from "@ogw_front/assets/viewer_svgs/surface_triangles.svg";
|
|
5
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
7
6
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
7
|
import ViewerSurfacePolygonsColoring from "@ogw_front/components/Viewer/Surface/PolygonsColoring.vue";
|
|
9
8
|
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
@@ -16,18 +15,17 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
16
15
|
const { applyBatchStyle } = useBatchStyle();
|
|
17
16
|
|
|
18
17
|
interface Props {
|
|
19
|
-
|
|
18
|
+
dataId: DataId;
|
|
19
|
+
index: number;
|
|
20
20
|
tooltip?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
const dataId = toRef(() => itemProps.id);
|
|
23
|
+
const { dataId, index, tooltip = "Polygons options" } = defineProps<Props>();
|
|
26
24
|
|
|
27
25
|
const visibility = computed<Visibility>({
|
|
28
|
-
get: () => dataStyleStore.meshPolygonsVisibility(dataId
|
|
26
|
+
get: () => dataStyleStore.meshPolygonsVisibility(dataId),
|
|
29
27
|
set: async (newValue) => {
|
|
30
|
-
await applyBatchStyle(dataId
|
|
28
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
31
29
|
dataStyleStore.setMeshPolygonsVisibility(meshId, newValue),
|
|
32
30
|
);
|
|
33
31
|
hybridViewerStore.remoteRender();
|
|
@@ -38,8 +36,7 @@ const visibility = computed<Visibility>({
|
|
|
38
36
|
<template>
|
|
39
37
|
<ViewerContextMenuItem
|
|
40
38
|
data-testid="meshPolygonsMenu"
|
|
41
|
-
:index="
|
|
42
|
-
:itemProps="itemProps"
|
|
39
|
+
:index="index"
|
|
43
40
|
:tooltip="tooltip"
|
|
44
41
|
:btnImage="PolygonalSurfacePolygons"
|
|
45
42
|
>
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
3
3
|
import ViewerSpecificPolygonsOptions from "@ogw_front/components/Viewer/Surface/PolygonsOptions.vue";
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
6
|
-
|
|
6
|
+
dataId: DataId;
|
|
7
|
+
index: number;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
const {
|
|
10
|
+
const { dataId, index } = defineProps<Props>();
|
|
10
11
|
</script>
|
|
11
12
|
|
|
12
13
|
<template>
|
|
13
|
-
<ViewerSpecificPolygonsOptions :
|
|
14
|
+
<ViewerSpecificPolygonsOptions :data-id="dataId" :index="index" tooltip="Triangles options" />
|
|
14
15
|
</template>
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
3
3
|
import TetrahedralSolidTetrahedra from "@ogw_front/assets/viewer_svgs/solid_polyhedra.svg";
|
|
4
4
|
import ViewerGenericMeshPolyhedraOptions from "@ogw_front/components/Viewer/Generic/Mesh/PolyhedraOptions.vue";
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
7
|
-
|
|
7
|
+
dataId: DataId;
|
|
8
|
+
index: number;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
|
-
const {
|
|
11
|
+
const { dataId, index } = defineProps<Props>();
|
|
11
12
|
</script>
|
|
12
13
|
|
|
13
14
|
<template>
|
|
14
15
|
<ViewerGenericMeshPolyhedraOptions
|
|
15
|
-
:
|
|
16
|
+
:data-id="dataId"
|
|
17
|
+
:index="index"
|
|
16
18
|
:btnImage="TetrahedralSolidTetrahedra"
|
|
17
19
|
tooltip="Tetrahedra options"
|
|
18
20
|
/>
|