@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,4 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
type MenuSide,
|
|
4
|
+
OPPOSITE_SIDE,
|
|
5
|
+
injectMenuItemCount,
|
|
6
|
+
menuItemSide,
|
|
7
|
+
} from "@ogw_front/composables/circular_menu";
|
|
2
8
|
import GlassCard from "@ogw_front/components/GlassCard.vue";
|
|
3
9
|
import { useAdaptiveStyles } from "@ogw_front/composables/use_adaptive_styles";
|
|
4
10
|
import { useMenuStore } from "@ogw_front/stores/menu";
|
|
@@ -14,27 +20,21 @@ const menuStore = useMenuStore();
|
|
|
14
20
|
const theme = useTheme();
|
|
15
21
|
const primaryColor = computed(() => theme.current.value.colors.primary);
|
|
16
22
|
|
|
17
|
-
interface ItemProps {
|
|
18
|
-
id: string;
|
|
19
|
-
meta_data: Record<string, unknown>;
|
|
20
|
-
tooltip_location: "right" | "top" | "left" | "bottom";
|
|
21
|
-
tooltip_origin: "right" | "top" | "left" | "bottom";
|
|
22
|
-
totalItems: number;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
23
|
interface Props {
|
|
26
24
|
index: number;
|
|
27
|
-
itemProps: ItemProps;
|
|
28
25
|
tooltip: string;
|
|
29
26
|
// An image, or an icon name of the app icon set (ph-...)
|
|
30
27
|
btnImage?: string;
|
|
31
28
|
btnIcon?: string;
|
|
32
29
|
}
|
|
33
30
|
|
|
34
|
-
const { index,
|
|
31
|
+
const { index, tooltip, btnImage = "", btnIcon = "" } = defineProps<Props>();
|
|
32
|
+
|
|
33
|
+
const itemCount = injectMenuItemCount();
|
|
34
|
+
const tooltipLocation = computed<MenuSide>(() => menuItemSide(index, itemCount.value));
|
|
35
35
|
|
|
36
36
|
const buttonCoords = computed(() => {
|
|
37
|
-
const angle = (index /
|
|
37
|
+
const angle = (index / itemCount.value) * 2 * Math.PI;
|
|
38
38
|
const deltaX = Math.cos(angle) * menuStore.menuRadius;
|
|
39
39
|
const deltaY = Math.sin(angle) * menuStore.menuRadius;
|
|
40
40
|
const size = 40;
|
|
@@ -108,7 +108,7 @@ const optionsStyle = computed<Record<string, string>>(() => {
|
|
|
108
108
|
if (!is_active.value || !optionsHeight.value) {
|
|
109
109
|
return {};
|
|
110
110
|
}
|
|
111
|
-
const angle = (index /
|
|
111
|
+
const angle = (index / itemCount.value) * 2 * Math.PI;
|
|
112
112
|
const radius = menuStore.menuRadius;
|
|
113
113
|
const absoluteButtonY = menuStore.menuY + Math.sin(angle) * radius;
|
|
114
114
|
const height = optionsHeight.value;
|
|
@@ -124,7 +124,7 @@ const optionsStyle = computed<Record<string, string>>(() => {
|
|
|
124
124
|
});
|
|
125
125
|
|
|
126
126
|
const optionsClass = computed<string>(() => {
|
|
127
|
-
const loc =
|
|
127
|
+
const loc = tooltipLocation.value;
|
|
128
128
|
const margin = MARGIN;
|
|
129
129
|
const radius = menuStore.menuRadius;
|
|
130
130
|
if (loc === "right") {
|
|
@@ -138,12 +138,10 @@ const optionsClass = computed<string>(() => {
|
|
|
138
138
|
function toggleOptions(): void {
|
|
139
139
|
menuStore.toggleItemOptions(index);
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
export type { ItemProps };
|
|
143
141
|
</script>
|
|
144
142
|
<template>
|
|
145
143
|
<v-sheet class="menu-item-container transition-swing" color="transparent">
|
|
146
|
-
<v-tooltip :location="
|
|
144
|
+
<v-tooltip :location="tooltipLocation" :origin="OPPOSITE_SIDE[tooltipLocation]">
|
|
147
145
|
<template v-slot:activator="{ props: tooltipProps }">
|
|
148
146
|
<v-btn
|
|
149
147
|
icon
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
2
3
|
import EdgedCurvePoints from "@ogw_front/assets/viewer_svgs/edged_curve_points.svg";
|
|
3
|
-
import type { ItemProps } from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
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="EdgedCurvePoints" />
|
|
15
16
|
</template>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { EdgeWidth, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
|
-
import
|
|
4
|
-
type ItemProps,
|
|
5
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
3
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
6
4
|
import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg";
|
|
7
5
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
6
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
8
7
|
import ViewerEdgedCurveSpecificEdgesColoring from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue";
|
|
9
8
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
10
9
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
|
|
@@ -17,26 +16,25 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
17
16
|
const { applyBatchStyle } = useBatchStyle();
|
|
18
17
|
|
|
19
18
|
interface Props {
|
|
20
|
-
|
|
19
|
+
dataId: DataId;
|
|
20
|
+
index: number;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
const dataId = toRef(() => itemProps.id);
|
|
23
|
+
const { dataId, index } = defineProps<Props>();
|
|
26
24
|
|
|
27
25
|
const visibility = computed<Visibility>({
|
|
28
|
-
get: () => dataStyleStore.meshEdgesVisibility(dataId
|
|
26
|
+
get: () => dataStyleStore.meshEdgesVisibility(dataId),
|
|
29
27
|
set: async (newValue) => {
|
|
30
|
-
await applyBatchStyle(dataId
|
|
28
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
31
29
|
dataStyleStore.setMeshEdgesVisibility(meshId, newValue),
|
|
32
30
|
);
|
|
33
31
|
hybridViewerStore.remoteRender();
|
|
34
32
|
},
|
|
35
33
|
});
|
|
36
34
|
const width = computed<EdgeWidth>({
|
|
37
|
-
get: () => dataStyleStore.meshEdgesWidth(dataId
|
|
35
|
+
get: () => dataStyleStore.meshEdgesWidth(dataId),
|
|
38
36
|
set: async (newValue) => {
|
|
39
|
-
await applyBatchStyle(dataId
|
|
37
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
40
38
|
dataStyleStore.setMeshEdgesWidth(meshId, newValue),
|
|
41
39
|
);
|
|
42
40
|
hybridViewerStore.remoteRender();
|
|
@@ -47,8 +45,7 @@ const width = computed<EdgeWidth>({
|
|
|
47
45
|
<template>
|
|
48
46
|
<ViewerContextMenuItem
|
|
49
47
|
data-testid="meshEdgesMenu"
|
|
50
|
-
:index="
|
|
51
|
-
:itemProps="itemProps"
|
|
48
|
+
:index="index"
|
|
52
49
|
:btnImage="EdgedCurveEdges"
|
|
53
50
|
tooltip="Edges options"
|
|
54
51
|
>
|
|
@@ -1,8 +1,7 @@
|
|
|
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";
|
|
4
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
6
5
|
import ViewerGenericMeshCellsColoring from "@ogw_front/components/Viewer/Generic/Mesh/CellsColoring.vue";
|
|
7
6
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
7
|
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
@@ -15,19 +14,18 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
15
14
|
const { applyBatchStyle } = useBatchStyle();
|
|
16
15
|
|
|
17
16
|
interface Props {
|
|
18
|
-
|
|
17
|
+
dataId: DataId;
|
|
18
|
+
index: number;
|
|
19
19
|
btnImage: string;
|
|
20
20
|
tooltip?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
const dataId = toRef(() => itemProps.id);
|
|
23
|
+
const { dataId, index, btnImage, tooltip = "Cells options" } = defineProps<Props>();
|
|
26
24
|
|
|
27
25
|
const visibility = computed<Visibility>({
|
|
28
|
-
get: () => dataStyleStore.meshCellsVisibility(dataId
|
|
26
|
+
get: () => dataStyleStore.meshCellsVisibility(dataId),
|
|
29
27
|
set: async (newValue) => {
|
|
30
|
-
await applyBatchStyle(dataId
|
|
28
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
31
29
|
dataStyleStore.setMeshCellsVisibility(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="meshCellsMenu"
|
|
41
|
-
:index="
|
|
42
|
-
:itemProps="itemProps"
|
|
39
|
+
:index="index"
|
|
43
40
|
:tooltip="tooltip"
|
|
44
41
|
:btnImage="btnImage"
|
|
45
42
|
>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { EdgeWidth, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
|
-
import
|
|
4
|
-
type ItemProps,
|
|
5
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
3
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
6
4
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
5
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
7
6
|
import ViewerGenericMeshEdgesColoring from "@ogw_front/components/Viewer/Generic/Mesh/EdgesColoring.vue";
|
|
8
7
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
9
8
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
|
|
@@ -21,29 +20,34 @@ interface CapabilityConfig {
|
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
interface Props {
|
|
24
|
-
|
|
23
|
+
dataId: DataId;
|
|
24
|
+
index: number;
|
|
25
25
|
btnImage: string;
|
|
26
26
|
tooltip?: string;
|
|
27
27
|
capabilities?: Record<string, CapabilityConfig>;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
const {
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const {
|
|
31
|
+
dataId,
|
|
32
|
+
index,
|
|
33
|
+
btnImage,
|
|
34
|
+
tooltip = "Edges options",
|
|
35
|
+
capabilities = {},
|
|
36
|
+
} = defineProps<Props>();
|
|
33
37
|
|
|
34
38
|
const visibility = computed<Visibility>({
|
|
35
|
-
get: () => dataStyleStore.meshEdgesVisibility(dataId
|
|
39
|
+
get: () => dataStyleStore.meshEdgesVisibility(dataId),
|
|
36
40
|
set: async (newValue) => {
|
|
37
|
-
await applyBatchStyle(dataId
|
|
41
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
38
42
|
dataStyleStore.setMeshEdgesVisibility(meshId, newValue),
|
|
39
43
|
);
|
|
40
44
|
hybridViewerStore.remoteRender();
|
|
41
45
|
},
|
|
42
46
|
});
|
|
43
47
|
const width = computed<EdgeWidth>({
|
|
44
|
-
get: () => dataStyleStore.meshEdgesWidth(dataId
|
|
48
|
+
get: () => dataStyleStore.meshEdgesWidth(dataId),
|
|
45
49
|
set: async (newValue) => {
|
|
46
|
-
await applyBatchStyle(dataId
|
|
50
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
47
51
|
dataStyleStore.setMeshEdgesWidth(meshId, newValue),
|
|
48
52
|
);
|
|
49
53
|
hybridViewerStore.remoteRender();
|
|
@@ -54,8 +58,7 @@ const width = computed<EdgeWidth>({
|
|
|
54
58
|
<template>
|
|
55
59
|
<ViewerContextMenuItem
|
|
56
60
|
data-testid="meshEdgesMenu"
|
|
57
|
-
:index="
|
|
58
|
-
:itemProps="itemProps"
|
|
61
|
+
:index="index"
|
|
59
62
|
:tooltip="tooltip"
|
|
60
63
|
:btnImage="btnImage"
|
|
61
64
|
>
|
|
@@ -17,10 +17,9 @@ import {
|
|
|
17
17
|
applyRangesPerData,
|
|
18
18
|
useBatchStyle,
|
|
19
19
|
} from "@ogw_front/composables/batch_style";
|
|
20
|
-
import
|
|
21
|
-
type ItemProps,
|
|
22
|
-
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
20
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
23
21
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
22
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
24
23
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
25
24
|
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size.vue";
|
|
26
25
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
@@ -32,73 +31,72 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
32
31
|
const { applyBatchStyle } = useBatchStyle();
|
|
33
32
|
|
|
34
33
|
interface Props {
|
|
35
|
-
|
|
34
|
+
dataId: DataId;
|
|
35
|
+
index: number;
|
|
36
36
|
btnImage: string;
|
|
37
37
|
tooltip?: string;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
const {
|
|
41
|
-
|
|
42
|
-
const dataId = toRef(() => itemProps.id);
|
|
40
|
+
const { dataId, index, btnImage, tooltip = "Points options" } = defineProps<Props>();
|
|
43
41
|
|
|
44
42
|
const visibility = computed<Visibility>({
|
|
45
|
-
get: () => dataStyleStore.meshPointsVisibility(dataId
|
|
43
|
+
get: () => dataStyleStore.meshPointsVisibility(dataId),
|
|
46
44
|
set: async (newValue) => {
|
|
47
|
-
await applyBatchStyle(dataId
|
|
45
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
48
46
|
dataStyleStore.setMeshPointsVisibility(meshId, newValue),
|
|
49
47
|
);
|
|
50
48
|
hybridViewerStore.remoteRender();
|
|
51
49
|
},
|
|
52
50
|
});
|
|
53
51
|
const size = computed<PointSize>({
|
|
54
|
-
get: () => dataStyleStore.meshPointsSize(dataId
|
|
52
|
+
get: () => dataStyleStore.meshPointsSize(dataId),
|
|
55
53
|
set: async (newValue) => {
|
|
56
|
-
await applyBatchStyle(dataId
|
|
54
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
57
55
|
dataStyleStore.setMeshPointsSize(meshId, newValue),
|
|
58
56
|
);
|
|
59
57
|
hybridViewerStore.remoteRender();
|
|
60
58
|
},
|
|
61
59
|
});
|
|
62
60
|
const coloring_style_key = computed<string>({
|
|
63
|
-
get: () => dataStyleStore.meshPointsActiveColoring(dataId
|
|
61
|
+
get: () => dataStyleStore.meshPointsActiveColoring(dataId),
|
|
64
62
|
set: async (newValue) => {
|
|
65
|
-
await applyBatchStyle(dataId
|
|
63
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
66
64
|
dataStyleStore.setMeshPointsActiveColoring(meshId, newValue),
|
|
67
65
|
);
|
|
68
66
|
hybridViewerStore.remoteRender();
|
|
69
67
|
},
|
|
70
68
|
});
|
|
71
69
|
const color = computed<ColorRGBA | undefined>({
|
|
72
|
-
get: () => dataStyleStore.meshPointsColor(dataId
|
|
70
|
+
get: () => dataStyleStore.meshPointsColor(dataId) as ColorRGBA | undefined,
|
|
73
71
|
set: async (newValue) => {
|
|
74
72
|
if (newValue === undefined) {
|
|
75
73
|
return;
|
|
76
74
|
}
|
|
77
|
-
await applyBatchStyle(dataId
|
|
75
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
78
76
|
dataStyleStore.setMeshPointsColor(meshId, newValue),
|
|
79
77
|
);
|
|
80
78
|
hybridViewerStore.remoteRender();
|
|
81
79
|
},
|
|
82
80
|
});
|
|
83
81
|
const opacity = computed<Opacity | undefined>({
|
|
84
|
-
get: () => dataStyleStore.meshPointsOpacity(dataId
|
|
82
|
+
get: () => dataStyleStore.meshPointsOpacity(dataId),
|
|
85
83
|
set: async (newValue) => {
|
|
86
84
|
if (newValue === undefined) {
|
|
87
85
|
return;
|
|
88
86
|
}
|
|
89
|
-
await applyBatchStyle(dataId
|
|
87
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
90
88
|
dataStyleStore.setMeshPointsOpacity(meshId, newValue),
|
|
91
89
|
);
|
|
92
90
|
hybridViewerStore.remoteRender();
|
|
93
91
|
},
|
|
94
92
|
});
|
|
95
93
|
const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
96
|
-
get: () => dataStyleStore.meshPointsVertexAttributeName(dataId
|
|
94
|
+
get: () => dataStyleStore.meshPointsVertexAttributeName(dataId),
|
|
97
95
|
set: async (newValue) => {
|
|
98
96
|
if (newValue === undefined) {
|
|
99
97
|
return;
|
|
100
98
|
}
|
|
101
|
-
await applyBatchStyle(dataId
|
|
99
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
102
100
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(meshId, newValue)),
|
|
103
101
|
);
|
|
104
102
|
hybridViewerStore.remoteRender();
|
|
@@ -106,52 +104,52 @@ const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
|
106
104
|
});
|
|
107
105
|
|
|
108
106
|
const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
109
|
-
get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId
|
|
107
|
+
get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId),
|
|
110
108
|
set: async (newValue) => {
|
|
111
109
|
if (newValue === undefined) {
|
|
112
110
|
return;
|
|
113
111
|
}
|
|
114
|
-
await applyBatchStyle(dataId
|
|
112
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
115
113
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(meshId, newValue)),
|
|
116
114
|
);
|
|
117
115
|
hybridViewerStore.remoteRender();
|
|
118
116
|
},
|
|
119
117
|
});
|
|
120
118
|
const vertex_attribute_item = computed<AttributeItem>({
|
|
121
|
-
get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId
|
|
119
|
+
get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId),
|
|
122
120
|
set: async (newValue) => {
|
|
123
|
-
await applyBatchStyle(dataId
|
|
121
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
124
122
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(meshId, newValue)),
|
|
125
123
|
);
|
|
126
124
|
hybridViewerStore.remoteRender();
|
|
127
125
|
},
|
|
128
126
|
});
|
|
129
127
|
const vertex_attribute_range = computed<AttributeRange>({
|
|
130
|
-
get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId
|
|
128
|
+
get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId),
|
|
131
129
|
set: async (newValue) => {
|
|
132
130
|
const [minimum, maximum] = newValue;
|
|
133
131
|
if (minimum === undefined || maximum === undefined) {
|
|
134
132
|
return;
|
|
135
133
|
}
|
|
136
|
-
await applyBatchStyle(dataId
|
|
134
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
137
135
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum)),
|
|
138
136
|
);
|
|
139
137
|
hybridViewerStore.remoteRender();
|
|
140
138
|
},
|
|
141
139
|
});
|
|
142
140
|
const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
143
|
-
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId
|
|
141
|
+
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId),
|
|
144
142
|
set: async (newValue) => {
|
|
145
|
-
await applyBatchStyle(dataId
|
|
143
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
146
144
|
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(meshId, newValue)),
|
|
147
145
|
);
|
|
148
146
|
hybridViewerStore.remoteRender();
|
|
149
147
|
},
|
|
150
148
|
});
|
|
151
149
|
const vertex_attribute_no_data_color = computed<ColorRGBA>({
|
|
152
|
-
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId
|
|
150
|
+
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId),
|
|
153
151
|
set: async (newValue) => {
|
|
154
|
-
await applyBatchStyle(dataId
|
|
152
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
155
153
|
dataStyleStore.setMeshPointsVertexAttributeNoDataColor(meshId, newValue),
|
|
156
154
|
);
|
|
157
155
|
hybridViewerStore.remoteRender();
|
|
@@ -169,8 +167,7 @@ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<v
|
|
|
169
167
|
<template>
|
|
170
168
|
<ViewerContextMenuItem
|
|
171
169
|
data-testid="meshPointsMenu"
|
|
172
|
-
:index="
|
|
173
|
-
:itemProps="itemProps"
|
|
170
|
+
:index="index"
|
|
174
171
|
:tooltip="tooltip"
|
|
175
172
|
:btnImage="btnImage"
|
|
176
173
|
>
|
|
@@ -1,8 +1,7 @@
|
|
|
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";
|
|
4
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
6
5
|
import ViewerGenericMeshPolygonsColoring from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsColoring.vue";
|
|
7
6
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
7
|
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
@@ -20,25 +19,25 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
20
19
|
const { applyBatchStyle } = useBatchStyle();
|
|
21
20
|
|
|
22
21
|
interface Props {
|
|
23
|
-
|
|
22
|
+
dataId: DataId;
|
|
23
|
+
index: number;
|
|
24
24
|
btnImage: string;
|
|
25
25
|
tooltip?: string;
|
|
26
26
|
capabilities?: Record<string, CapabilityConfig>;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const {
|
|
30
|
-
|
|
30
|
+
dataId,
|
|
31
|
+
index,
|
|
31
32
|
btnImage,
|
|
32
33
|
tooltip = "Polygons options",
|
|
33
34
|
capabilities = {},
|
|
34
35
|
} = defineProps<Props>();
|
|
35
36
|
|
|
36
|
-
const dataId = toRef(() => itemProps.id);
|
|
37
|
-
|
|
38
37
|
const visibility = computed<Visibility>({
|
|
39
|
-
get: () => dataStyleStore.meshPolygonsVisibility(dataId
|
|
38
|
+
get: () => dataStyleStore.meshPolygonsVisibility(dataId),
|
|
40
39
|
set: async (newValue) => {
|
|
41
|
-
await applyBatchStyle(dataId
|
|
40
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
42
41
|
dataStyleStore.setMeshPolygonsVisibility(meshId, newValue),
|
|
43
42
|
);
|
|
44
43
|
hybridViewerStore.remoteRender();
|
|
@@ -49,8 +48,7 @@ const visibility = computed<Visibility>({
|
|
|
49
48
|
<template>
|
|
50
49
|
<ViewerContextMenuItem
|
|
51
50
|
data-testid="meshPolygonsMenu"
|
|
52
|
-
:index="
|
|
53
|
-
:itemProps="itemProps"
|
|
51
|
+
:index="index"
|
|
54
52
|
:tooltip="tooltip"
|
|
55
53
|
:btnImage="btnImage"
|
|
56
54
|
>
|
|
@@ -1,8 +1,7 @@
|
|
|
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";
|
|
4
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
6
5
|
import ViewerGenericMeshPolyhedraColoring from "@ogw_front/components/Viewer/Generic/Mesh/PolyhedraColoring.vue";
|
|
7
6
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
7
|
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
@@ -15,19 +14,18 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
15
14
|
const { applyBatchStyle } = useBatchStyle();
|
|
16
15
|
|
|
17
16
|
interface Props {
|
|
18
|
-
|
|
17
|
+
dataId: DataId;
|
|
18
|
+
index: number;
|
|
19
19
|
btnImage: string;
|
|
20
20
|
tooltip?: string;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const {
|
|
24
|
-
|
|
25
|
-
const dataId = toRef(() => itemProps.id);
|
|
23
|
+
const { dataId, index, btnImage, 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="btnImage"
|
|
45
42
|
>
|
|
@@ -8,7 +8,7 @@ import type {
|
|
|
8
8
|
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
9
9
|
import type { AttributeRange, AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
10
10
|
import type { BlockId } from "@ogw_front/types/identifiers";
|
|
11
|
-
import type { CollectionComponent } from "@
|
|
11
|
+
import type { CollectionComponent } from "@ogw_internal/stores/data/model/collections";
|
|
12
12
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
13
13
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
14
14
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { CollectionComponent } from "@
|
|
2
|
+
import type { CollectionComponent } from "@ogw_internal/stores/data/model/collections";
|
|
3
3
|
import type { CornerId } from "@ogw_front/types/identifiers";
|
|
4
4
|
import ViewerGenericModelCornerComponentOptions from "@ogw_front/components/Viewer/Generic/Model/CornerComponentOptions.vue";
|
|
5
5
|
import ViewerGenericModelCornersTypeOptions from "@ogw_front/components/Viewer/Generic/Model/CornersTypeOptions.vue";
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
Visibility,
|
|
7
7
|
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
8
8
|
import type { AttributeRange, AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
9
|
-
import type { CollectionComponent } from "@
|
|
9
|
+
import type { CollectionComponent } from "@ogw_internal/stores/data/model/collections";
|
|
10
10
|
import { MODEL_VERTEX_COLORING } from "@ogw_front/utils/model_component_coloring";
|
|
11
11
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
12
12
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
@@ -1,27 +1,26 @@
|
|
|
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 ModelEdgesCard from "./ModelEdgesCard.vue";
|
|
6
4
|
import SurfaceEdges from "@ogw_front/assets/viewer_svgs/surface_edges.svg";
|
|
5
|
+
import ViewerContextMenuItem from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
7
6
|
|
|
8
7
|
interface Props {
|
|
9
|
-
|
|
8
|
+
dataId: DataId;
|
|
9
|
+
index: number;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const {
|
|
12
|
+
const { dataId, index } = defineProps<Props>();
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<template>
|
|
16
16
|
<ViewerContextMenuItem
|
|
17
17
|
data-testid="modelEdgesMenu"
|
|
18
|
-
:index="
|
|
19
|
-
:itemProps="itemProps"
|
|
18
|
+
:index="index"
|
|
20
19
|
tooltip="Edges options"
|
|
21
20
|
:btnImage="SurfaceEdges"
|
|
22
21
|
>
|
|
23
22
|
<template #options>
|
|
24
|
-
<ModelEdgesCard :
|
|
23
|
+
<ModelEdgesCard :data-id="dataId" />
|
|
25
24
|
</template>
|
|
26
25
|
</ViewerContextMenuItem>
|
|
27
26
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { CollectionComponent } from "@
|
|
2
|
+
import type { CollectionComponent } from "@ogw_internal/stores/data/model/collections";
|
|
3
3
|
import type { LineId } from "@ogw_front/types/identifiers";
|
|
4
4
|
import ViewerGenericModelLineComponentOptions from "@ogw_front/components/Viewer/Generic/Model/LineComponentOptions.vue";
|
|
5
5
|
import ViewerGenericModelLinesTypeOptions from "@ogw_front/components/Viewer/Generic/Model/LinesTypeOptions.vue";
|
|
@@ -6,7 +6,7 @@ import type {
|
|
|
6
6
|
Visibility,
|
|
7
7
|
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
8
8
|
import type { AttributeRange, AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
9
|
-
import type { CollectionComponent } from "@
|
|
9
|
+
import type { CollectionComponent } from "@ogw_internal/stores/data/model/collections";
|
|
10
10
|
import { MODEL_LINE_COLORING } from "@ogw_front/utils/model_component_coloring";
|
|
11
11
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
12
12
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|