@geode/opengeodeweb-front 10.44.0 → 10.44.1
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/ClippingPlanes.vue +7 -5
- package/app/components/CrsSelector.vue +2 -1
- package/app/components/ExtensionSelector.vue +8 -7
- package/app/components/FactorFilterPanel.vue +4 -4
- package/app/components/MissingFilesSelector.vue +2 -1
- package/app/components/ObjectSelector.vue +4 -3
- package/app/components/ThresholdCard.vue +6 -5
- package/app/components/ThresholdFilter.vue +11 -10
- package/app/components/TimeSeriesTargetSelector.vue +10 -7
- package/app/components/Viewer/ContextMenu/InfoCard.vue +12 -10
- package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +72 -63
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +12 -10
- package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +76 -71
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +72 -63
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -10
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +54 -45
- package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +76 -73
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +72 -67
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +29 -21
- package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +15 -7
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +2 -1
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +13 -6
- package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +19 -11
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +2 -1
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +17 -10
- package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +3 -2
- package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +2 -1
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -2
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +29 -21
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +2 -2
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +2 -3
- package/app/components/Viewer/Options/AttributeSelector.vue +11 -7
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +10 -13
- package/app/components/Viewer/Options/TextureItem.vue +5 -4
- package/app/components/Viewer/Options/TexturesSelector.vue +5 -8
- package/app/components/Viewer/Options/TimeStepSlider.vue +3 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +6 -13
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +40 -38
- package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +69 -65
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +8 -6
- package/app/components/Viewer/Surface/PolygonsColoring.vue +73 -71
- package/app/components/Viewer/Surface/PolygonsOptions.vue +8 -6
- package/app/composables/attribute_coloring_style.ts +17 -12
- package/app/composables/attribute_selector.ts +9 -15
- package/app/composables/batch_style.ts +25 -16
- package/app/composables/batch_style_model.ts +6 -5
- package/app/composables/clipping_planes_widget.ts +2 -5
- package/app/composables/clipping_slices.ts +2 -1
- package/app/composables/hover_highlight.ts +17 -16
- package/app/composables/live_data_item.ts +3 -2
- package/app/composables/model_attribute_style.ts +2 -1
- package/app/composables/model_menu_context.ts +3 -4
- package/app/composables/model_tree.ts +3 -2
- package/app/composables/project_manager_helpers/types.ts +10 -4
- package/app/composables/tree_filter.ts +3 -3
- package/app/composables/tree_keyboard_nav.ts +1 -6
- package/app/composables/tree_scroll.ts +2 -0
- package/app/composables/use_overlapping_picker.ts +9 -9
- package/app/stores/basemap_helpers/georeferenced.ts +1 -1
- package/app/stores/basemap_helpers/viewer.ts +2 -1
- package/app/stores/crs.ts +6 -5
- package/app/stores/data.ts +84 -69
- package/app/stores/data_helpers/collections.ts +13 -21
- package/app/stores/data_helpers/mesh.ts +19 -24
- package/app/stores/data_helpers/relations.ts +12 -12
- package/app/stores/data_style.ts +26 -20
- package/app/stores/menu.ts +17 -11
- package/app/stores/treeview.ts +28 -27
- package/app/types/attribute.ts +37 -0
- package/app/types/identifiers.ts +72 -0
- package/app/types/style.ts +13 -0
- package/app/types/texture.ts +6 -0
- package/app/types/tree.ts +17 -0
- package/app/utils/attribute_range.ts +2 -1
- package/app/utils/attributes.ts +13 -4
- package/app/utils/basemap_tree.ts +3 -5
- package/app/utils/clipping_planes.ts +6 -4
- package/app/utils/clipping_planes_scene.ts +4 -3
- package/app/utils/crs.ts +4 -1
- package/app/utils/default_styles/constants.ts +8 -1
- package/app/utils/default_styles/mesh_components.ts +21 -25
- package/app/utils/default_styles/meshes.ts +7 -22
- package/app/utils/default_styles/model_components.ts +22 -26
- package/app/utils/default_styles/models.ts +11 -13
- package/app/utils/import_workflow.ts +37 -29
- package/app/utils/legacy_data_id.ts +16 -0
- package/app/utils/slice.ts +7 -2
- package/app/utils/threshold.ts +1 -8
- package/app/utils/threshold_sources.ts +8 -5
- package/app/utils/treeview.ts +3 -2
- package/internal/database/tables/data.ts +1 -1
- package/internal/database/tables/data_style.ts +1 -1
- package/internal/database/tables/model_components.ts +1 -1
- package/internal/database/tables/model_components_relation.ts +1 -1
- package/internal/stores/data_style/attribute_default.ts +14 -0
- package/internal/stores/data_style/attribute_types.ts +59 -0
- package/internal/stores/data_style/attribute_valid.ts +16 -0
- package/internal/stores/data_style/mesh/base_style.ts +17 -15
- package/internal/stores/data_style/mesh/cells/cell.ts +64 -49
- package/internal/stores/data_style/mesh/cells/cell_attribute.ts +42 -66
- package/internal/stores/data_style/mesh/cells/cell_config.ts +59 -53
- package/internal/stores/data_style/mesh/cells/color.ts +8 -7
- package/internal/stores/data_style/mesh/cells/common.ts +16 -15
- package/internal/stores/data_style/mesh/cells/index.ts +49 -47
- package/internal/stores/data_style/mesh/cells/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/cells/textures.ts +8 -7
- package/internal/stores/data_style/mesh/cells/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/cells/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/cells/visibility.ts +11 -7
- package/internal/stores/data_style/mesh/edges/color.ts +8 -7
- package/internal/stores/data_style/mesh/edges/common.ts +13 -12
- package/internal/stores/data_style/mesh/edges/edge.ts +64 -49
- package/internal/stores/data_style/mesh/edges/edge_attribute.ts +42 -66
- package/internal/stores/data_style/mesh/edges/edge_config.ts +59 -53
- package/internal/stores/data_style/mesh/edges/index.ts +49 -47
- package/internal/stores/data_style/mesh/edges/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/edges/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/edges/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/edges/visibility.ts +11 -7
- package/internal/stores/data_style/mesh/edges/width.ts +9 -7
- package/internal/stores/data_style/mesh/index.ts +27 -24
- package/internal/stores/data_style/mesh/points/color.ts +8 -7
- package/internal/stores/data_style/mesh/points/common.ts +16 -14
- package/internal/stores/data_style/mesh/points/index.ts +39 -37
- package/internal/stores/data_style/mesh/points/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/points/size.ts +9 -7
- package/internal/stores/data_style/mesh/points/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/points/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/points/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/points/visibility.ts +8 -6
- package/internal/stores/data_style/mesh/polygons/color.ts +8 -7
- package/internal/stores/data_style/mesh/polygons/common.ts +19 -15
- package/internal/stores/data_style/mesh/polygons/index.ts +49 -50
- package/internal/stores/data_style/mesh/polygons/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/polygons/polygon.ts +66 -50
- package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polygons/polygon_config.ts +65 -53
- package/internal/stores/data_style/mesh/polygons/textures.ts +8 -7
- package/internal/stores/data_style/mesh/polygons/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polygons/vertex_config.ts +65 -53
- package/internal/stores/data_style/mesh/polygons/visibility.ts +12 -7
- package/internal/stores/data_style/mesh/polyhedra/color.ts +13 -9
- package/internal/stores/data_style/mesh/polyhedra/common.ts +13 -12
- package/internal/stores/data_style/mesh/polyhedra/index.ts +51 -51
- package/internal/stores/data_style/mesh/polyhedra/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +59 -53
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +46 -69
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +65 -55
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +65 -53
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +12 -7
- package/internal/stores/data_style/model/blocks/apply_coloring.ts +11 -12
- package/internal/stores/data_style/model/blocks/color.ts +25 -26
- package/internal/stores/data_style/model/blocks/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/blocks/common.ts +26 -22
- package/internal/stores/data_style/model/blocks/index.ts +8 -7
- package/internal/stores/data_style/model/blocks/polyhedron.ts +114 -135
- package/internal/stores/data_style/model/blocks/vertex.ts +110 -132
- package/internal/stores/data_style/model/blocks/visibility.ts +11 -9
- package/internal/stores/data_style/model/color.ts +55 -41
- package/internal/stores/data_style/model/common.ts +16 -14
- package/internal/stores/data_style/model/component_style.ts +0 -16
- package/internal/stores/data_style/model/corners/color.ts +21 -19
- package/internal/stores/data_style/model/corners/common.ts +26 -22
- package/internal/stores/data_style/model/corners/index.ts +21 -24
- package/internal/stores/data_style/model/corners/vertex.ts +103 -122
- package/internal/stores/data_style/model/corners/visibility.ts +11 -9
- package/internal/stores/data_style/model/edges/common.ts +7 -6
- package/internal/stores/data_style/model/edges/component.ts +63 -55
- package/internal/stores/data_style/model/edges/visibility.ts +24 -16
- package/internal/stores/data_style/model/edges/width.ts +10 -8
- package/internal/stores/data_style/model/index.ts +7 -6
- package/internal/stores/data_style/model/lines/apply_coloring.ts +11 -9
- package/internal/stores/data_style/model/lines/color.ts +25 -23
- package/internal/stores/data_style/model/lines/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/lines/common.ts +29 -21
- package/internal/stores/data_style/model/lines/edge.ts +109 -128
- package/internal/stores/data_style/model/lines/index.ts +8 -7
- package/internal/stores/data_style/model/lines/vertex.ts +109 -128
- package/internal/stores/data_style/model/lines/visibility.ts +11 -9
- package/internal/stores/data_style/model/points/common.ts +7 -6
- package/internal/stores/data_style/model/points/component.ts +62 -54
- package/internal/stores/data_style/model/points/index.ts +12 -7
- package/internal/stores/data_style/model/points/size.ts +10 -8
- package/internal/stores/data_style/model/points/visibility.ts +13 -8
- package/internal/stores/data_style/model/selection.ts +6 -11
- package/internal/stores/data_style/model/surfaces/apply_coloring.ts +11 -15
- package/internal/stores/data_style/model/surfaces/color.ts +31 -23
- package/internal/stores/data_style/model/surfaces/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/surfaces/common.ts +26 -22
- package/internal/stores/data_style/model/surfaces/index.ts +8 -7
- package/internal/stores/data_style/model/surfaces/polygon.ts +113 -138
- package/internal/stores/data_style/model/surfaces/vertex.ts +117 -133
- package/internal/stores/data_style/model/surfaces/visibility.ts +11 -9
- package/internal/stores/data_style/model/visibility.ts +18 -16
- package/internal/stores/data_style/model/visibility_dispatch.ts +4 -4
- package/internal/stores/data_style/state.ts +7 -6
- package/internal/stores/data_style/state_shared.ts +11 -10
- package/internal/stores/data_style/time_step.ts +21 -15
- package/internal/stores/data_style/types.ts +4 -3
- package/internal/stores/hybrid_viewer/camera.ts +11 -6
- package/internal/stores/hybrid_viewer/filters.ts +16 -14
- package/internal/stores/hybrid_viewer/highlight.ts +6 -5
- package/internal/stores/hybrid_viewer/scene.ts +20 -18
- package/internal/stores/hybrid_viewer/vtk_types.ts +2 -2
- package/internal/utils/api_fetch.ts +1 -1
- package/internal/utils/upload_file.ts +1 -7
- package/package.json +1 -1
- package/shared/utils/fetch_raw.ts +7 -8
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
AttributeColorMap,
|
|
4
|
+
AttributeItem,
|
|
5
|
+
AttributeName,
|
|
6
|
+
AttributeRange,
|
|
7
|
+
AttributeTimeStep,
|
|
8
|
+
} from "@ogw_front/types/attribute";
|
|
9
|
+
import type { DataId, MeshId } from "@ogw_front/types/identifiers";
|
|
2
10
|
import {
|
|
3
11
|
type RangesPerData,
|
|
4
12
|
applyRangesPerData,
|
|
5
13
|
useBatchStyle,
|
|
6
14
|
} from "@ogw_front/composables/batch_style";
|
|
15
|
+
import type { Opacity } from "@ogw_front/types/style";
|
|
7
16
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
8
17
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
9
18
|
import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
|
|
@@ -15,179 +24,175 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
15
24
|
const { applyBatchStyle } = useBatchStyle();
|
|
16
25
|
|
|
17
26
|
interface Props {
|
|
18
|
-
|
|
27
|
+
dataId: DataId;
|
|
19
28
|
}
|
|
20
29
|
|
|
21
|
-
const {
|
|
30
|
+
const { dataId } = defineProps<Props>();
|
|
22
31
|
|
|
23
32
|
const coloring_style_key = computed<string>({
|
|
24
|
-
get: () => dataStyleStore.meshPolyhedraActiveColoring(
|
|
33
|
+
get: () => dataStyleStore.meshPolyhedraActiveColoring(dataId),
|
|
25
34
|
set: async (newValue) => {
|
|
26
|
-
await applyBatchStyle(
|
|
27
|
-
dataStyleStore.setMeshPolyhedraActiveColoring(
|
|
35
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
36
|
+
dataStyleStore.setMeshPolyhedraActiveColoring(meshId, newValue),
|
|
28
37
|
);
|
|
29
38
|
hybridViewerStore.remoteRender();
|
|
30
39
|
},
|
|
31
40
|
});
|
|
32
41
|
const color = useBatchStyleModel<RGBAColor>(
|
|
33
|
-
() =>
|
|
34
|
-
(
|
|
35
|
-
(
|
|
42
|
+
() => dataId,
|
|
43
|
+
(meshId) => dataStyleStore.meshPolyhedraColor(meshId) as RGBAColor | undefined,
|
|
44
|
+
(meshId, value) => dataStyleStore.setMeshPolyhedraColor(meshId, value),
|
|
36
45
|
);
|
|
37
|
-
const opacity = useBatchStyleModel<
|
|
38
|
-
() =>
|
|
39
|
-
(
|
|
40
|
-
(
|
|
46
|
+
const opacity = useBatchStyleModel<Opacity>(
|
|
47
|
+
() => dataId,
|
|
48
|
+
(meshId) => dataStyleStore.meshPolyhedraOpacity(meshId),
|
|
49
|
+
(meshId, value) => dataStyleStore.setMeshPolyhedraOpacity(meshId, value),
|
|
41
50
|
);
|
|
42
|
-
const vertex_attribute_name = computed<
|
|
43
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeName(
|
|
51
|
+
const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
52
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeName(dataId),
|
|
44
53
|
set: async (newValue) => {
|
|
45
54
|
if (newValue === undefined) {
|
|
46
55
|
return;
|
|
47
56
|
}
|
|
48
|
-
await applyBatchStyle(
|
|
49
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeName(
|
|
57
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
58
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeName(meshId, newValue)),
|
|
50
59
|
);
|
|
51
60
|
hybridViewerStore.remoteRender();
|
|
52
61
|
},
|
|
53
62
|
});
|
|
54
63
|
|
|
55
|
-
const vertex_attribute_time_step = computed<
|
|
56
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeTimeStep(
|
|
64
|
+
const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
65
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeTimeStep(dataId),
|
|
57
66
|
set: async (newValue) => {
|
|
58
67
|
if (newValue === undefined) {
|
|
59
68
|
return;
|
|
60
69
|
}
|
|
61
|
-
await applyBatchStyle(
|
|
62
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeTimeStep(
|
|
70
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
71
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeTimeStep(meshId, newValue)),
|
|
63
72
|
);
|
|
64
73
|
hybridViewerStore.remoteRender();
|
|
65
74
|
},
|
|
66
75
|
});
|
|
67
|
-
const vertex_attribute_item = computed<
|
|
68
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeItem(
|
|
76
|
+
const vertex_attribute_item = computed<AttributeItem>({
|
|
77
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeItem(dataId),
|
|
69
78
|
set: async (newValue) => {
|
|
70
|
-
await applyBatchStyle(
|
|
71
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeItem(
|
|
79
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
80
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeItem(meshId, newValue)),
|
|
72
81
|
);
|
|
73
82
|
hybridViewerStore.remoteRender();
|
|
74
83
|
},
|
|
75
84
|
});
|
|
76
|
-
const vertex_attribute_range = computed<
|
|
77
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(
|
|
85
|
+
const vertex_attribute_range = computed<AttributeRange>({
|
|
86
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(dataId),
|
|
78
87
|
set: async (newValue) => {
|
|
79
88
|
const [minimum, maximum] = newValue;
|
|
80
89
|
if (minimum === undefined || maximum === undefined) {
|
|
81
90
|
return;
|
|
82
91
|
}
|
|
83
|
-
await applyBatchStyle(
|
|
92
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
84
93
|
Promise.resolve(
|
|
85
|
-
dataStyleStore.setMeshPolyhedraVertexAttributeRange(
|
|
94
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeRange(meshId, minimum, maximum),
|
|
86
95
|
),
|
|
87
96
|
);
|
|
88
97
|
hybridViewerStore.remoteRender();
|
|
89
98
|
},
|
|
90
99
|
});
|
|
91
|
-
const vertex_attribute_color_map = computed<
|
|
92
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(
|
|
100
|
+
const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
101
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(dataId),
|
|
93
102
|
set: async (newValue) => {
|
|
94
|
-
await applyBatchStyle(
|
|
95
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeColorMap(
|
|
103
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
104
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeColorMap(meshId, newValue)),
|
|
96
105
|
);
|
|
97
106
|
hybridViewerStore.remoteRender();
|
|
98
107
|
},
|
|
99
108
|
});
|
|
100
109
|
const vertex_attribute_no_data_color = computed<RGBAColor>({
|
|
101
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeNoDataColor(
|
|
110
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeNoDataColor(dataId),
|
|
102
111
|
set: async (newValue) => {
|
|
103
|
-
await applyBatchStyle(
|
|
104
|
-
dataStyleStore.setMeshPolyhedraVertexAttributeNoDataColor(
|
|
112
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
113
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeNoDataColor(meshId, newValue),
|
|
105
114
|
);
|
|
106
115
|
hybridViewerStore.remoteRender();
|
|
107
116
|
},
|
|
108
117
|
});
|
|
109
|
-
const polyhedron_attribute_name = computed<
|
|
110
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeName(
|
|
118
|
+
const polyhedron_attribute_name = computed<AttributeName | undefined>({
|
|
119
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeName(dataId),
|
|
111
120
|
set: async (newValue) => {
|
|
112
121
|
if (newValue === undefined) {
|
|
113
122
|
return;
|
|
114
123
|
}
|
|
115
|
-
await applyBatchStyle(
|
|
116
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeName(
|
|
124
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
125
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeName(meshId, newValue)),
|
|
117
126
|
);
|
|
118
127
|
hybridViewerStore.remoteRender();
|
|
119
128
|
},
|
|
120
129
|
});
|
|
121
130
|
|
|
122
|
-
const polyhedron_attribute_time_step = computed<
|
|
123
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeTimeStep(
|
|
131
|
+
const polyhedron_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
132
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeTimeStep(dataId),
|
|
124
133
|
set: async (newValue) => {
|
|
125
134
|
if (newValue === undefined) {
|
|
126
135
|
return;
|
|
127
136
|
}
|
|
128
|
-
await applyBatchStyle(
|
|
129
|
-
Promise.resolve(
|
|
130
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeTimeStep(targetId, newValue),
|
|
131
|
-
),
|
|
137
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
138
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeTimeStep(meshId, newValue)),
|
|
132
139
|
);
|
|
133
140
|
hybridViewerStore.remoteRender();
|
|
134
141
|
},
|
|
135
142
|
});
|
|
136
|
-
const polyhedron_attribute_item = computed<
|
|
137
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeItem(
|
|
143
|
+
const polyhedron_attribute_item = computed<AttributeItem>({
|
|
144
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeItem(dataId),
|
|
138
145
|
set: async (newValue) => {
|
|
139
|
-
await applyBatchStyle(
|
|
140
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeItem(
|
|
146
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
147
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeItem(meshId, newValue)),
|
|
141
148
|
);
|
|
142
149
|
hybridViewerStore.remoteRender();
|
|
143
150
|
},
|
|
144
151
|
});
|
|
145
|
-
const polyhedron_attribute_range = computed<
|
|
146
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeRange(
|
|
152
|
+
const polyhedron_attribute_range = computed<AttributeRange>({
|
|
153
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeRange(dataId),
|
|
147
154
|
set: async (newValue) => {
|
|
148
155
|
const [minimum, maximum] = newValue;
|
|
149
156
|
if (minimum === undefined || maximum === undefined) {
|
|
150
157
|
return;
|
|
151
158
|
}
|
|
152
|
-
await applyBatchStyle(
|
|
159
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
153
160
|
Promise.resolve(
|
|
154
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(
|
|
161
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(meshId, minimum, maximum),
|
|
155
162
|
),
|
|
156
163
|
);
|
|
157
164
|
hybridViewerStore.remoteRender();
|
|
158
165
|
},
|
|
159
166
|
});
|
|
160
|
-
const polyhedron_attribute_color_map = computed<
|
|
161
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(
|
|
167
|
+
const polyhedron_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
168
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(dataId),
|
|
162
169
|
set: async (newValue) => {
|
|
163
|
-
await applyBatchStyle(
|
|
164
|
-
Promise.resolve(
|
|
165
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeColorMap(targetId, newValue),
|
|
166
|
-
),
|
|
170
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
171
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeColorMap(meshId, newValue)),
|
|
167
172
|
);
|
|
168
173
|
hybridViewerStore.remoteRender();
|
|
169
174
|
},
|
|
170
175
|
});
|
|
171
176
|
const polyhedron_attribute_no_data_color = computed<RGBAColor>({
|
|
172
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeNoDataColor(
|
|
177
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeNoDataColor(dataId),
|
|
173
178
|
set: async (newValue) => {
|
|
174
|
-
await applyBatchStyle(
|
|
175
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeNoDataColor(
|
|
179
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
180
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeNoDataColor(meshId, newValue),
|
|
176
181
|
);
|
|
177
182
|
hybridViewerStore.remoteRender();
|
|
178
183
|
},
|
|
179
184
|
});
|
|
180
185
|
|
|
181
186
|
async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
182
|
-
await applyRangesPerData(ranges, (
|
|
183
|
-
dataStyleStore.setMeshPolyhedraVertexAttributeRange(
|
|
187
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
188
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeRange(meshId, minimum, maximum),
|
|
184
189
|
);
|
|
185
190
|
hybridViewerStore.remoteRender();
|
|
186
191
|
}
|
|
187
192
|
|
|
188
193
|
async function setPolyhedronAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
189
|
-
await applyRangesPerData(ranges, (
|
|
190
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(
|
|
194
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
195
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(meshId, minimum, maximum),
|
|
191
196
|
);
|
|
192
197
|
hybridViewerStore.remoteRender();
|
|
193
198
|
}
|
|
@@ -195,7 +200,7 @@ async function setPolyhedronAttributeRangesPerData(ranges: RangesPerData): Promi
|
|
|
195
200
|
|
|
196
201
|
<template>
|
|
197
202
|
<ViewerOptionsColoringTypeSelector
|
|
198
|
-
:id="
|
|
203
|
+
:data-id="dataId"
|
|
199
204
|
v-model:coloring_style_key="coloring_style_key"
|
|
200
205
|
v-model:color="color"
|
|
201
206
|
v-model:opacity="opacity"
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import ViewerContextMenuItem, {
|
|
3
3
|
type ItemProps,
|
|
4
4
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
5
6
|
import ViewerGenericMeshPolyhedraColoring from "@ogw_front/components/Viewer/Generic/Mesh/PolyhedraColoring.vue";
|
|
6
7
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
|
+
import type { Visibility } from "@ogw_front/types/style";
|
|
7
9
|
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
8
10
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
9
11
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -20,13 +22,13 @@ interface Props {
|
|
|
20
22
|
|
|
21
23
|
const { itemProps, btnImage, tooltip = "Polyhedra options" } = defineProps<Props>();
|
|
22
24
|
|
|
23
|
-
const
|
|
25
|
+
const dataId = toRef(() => itemProps.id);
|
|
24
26
|
|
|
25
|
-
const visibility = computed<
|
|
26
|
-
get: () => dataStyleStore.meshPolyhedraVisibility(
|
|
27
|
+
const visibility = computed<Visibility>({
|
|
28
|
+
get: () => dataStyleStore.meshPolyhedraVisibility(dataId.value),
|
|
27
29
|
set: async (newValue) => {
|
|
28
|
-
await applyBatchStyle(
|
|
29
|
-
dataStyleStore.setMeshPolyhedraVisibility(
|
|
30
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
31
|
+
dataStyleStore.setMeshPolyhedraVisibility(meshId, newValue),
|
|
30
32
|
);
|
|
31
33
|
hybridViewerStore.remoteRender();
|
|
32
34
|
},
|
|
@@ -48,7 +50,7 @@ const visibility = computed<boolean>({
|
|
|
48
50
|
/>
|
|
49
51
|
<template v-if="visibility">
|
|
50
52
|
<v-divider />
|
|
51
|
-
<ViewerGenericMeshPolyhedraColoring :id="
|
|
53
|
+
<ViewerGenericMeshPolyhedraColoring :data-id="dataId" />
|
|
52
54
|
</template>
|
|
53
55
|
</template>
|
|
54
56
|
</ViewerContextMenuItem>
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
// oxlint-disable eslint/max-lines
|
|
3
|
+
import type {
|
|
4
|
+
AttributeItem,
|
|
5
|
+
AttributeName,
|
|
6
|
+
AttributeRange,
|
|
7
|
+
AttributeTimeStep,
|
|
8
|
+
} from "@ogw_front/types/attribute";
|
|
9
|
+
import type { BlockId } from "@ogw_front/types/identifiers";
|
|
3
10
|
import type { CollectionComponent } from "@ogw_front/stores/data_helpers/collections";
|
|
4
11
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
5
12
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
13
|
+
import type { Visibility } from "@ogw_front/types/style";
|
|
6
14
|
import VisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
7
15
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
8
16
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -10,7 +18,7 @@ import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
|
10
18
|
|
|
11
19
|
interface Props {
|
|
12
20
|
modelId: string;
|
|
13
|
-
blockId?:
|
|
21
|
+
blockId?: BlockId;
|
|
14
22
|
targetBlockIds: string[];
|
|
15
23
|
collections?: CollectionComponent[];
|
|
16
24
|
activeTab?: string;
|
|
@@ -34,7 +42,7 @@ const referenceBlockId = computed<string | undefined>(() =>
|
|
|
34
42
|
const blockComponentIds = computed<string[]>(() => (blockId !== undefined && [blockId]) || []);
|
|
35
43
|
|
|
36
44
|
// Visibility
|
|
37
|
-
const blocksVisibility = computed<
|
|
45
|
+
const blocksVisibility = computed<Visibility>({
|
|
38
46
|
get: () => {
|
|
39
47
|
if (collections) {
|
|
40
48
|
return targetBlockIds.every((id) => dataStyleStore.modelBlockVisibility(modelId, id));
|
|
@@ -47,7 +55,7 @@ const blocksVisibility = computed<boolean>({
|
|
|
47
55
|
},
|
|
48
56
|
});
|
|
49
57
|
|
|
50
|
-
const blockVisibility = computed<
|
|
58
|
+
const blockVisibility = computed<Visibility | undefined>({
|
|
51
59
|
get: () => dataStyleStore.modelBlockVisibility(modelId, blockId) as boolean | undefined,
|
|
52
60
|
set: async (newValue) => {
|
|
53
61
|
if (newValue === undefined || blockId === undefined) {
|
|
@@ -116,7 +124,7 @@ const blockActiveColoring = computed<string | undefined>({
|
|
|
116
124
|
});
|
|
117
125
|
|
|
118
126
|
// Group Attributes
|
|
119
|
-
const blocksVertexAttributeName = computed<
|
|
127
|
+
const blocksVertexAttributeName = computed<AttributeName | undefined>({
|
|
120
128
|
get: () => dataStyleStore.modelBlocksVertexAttributeName(modelId, referenceBlockId.value),
|
|
121
129
|
set: async (newValue) => {
|
|
122
130
|
if (newValue === undefined) {
|
|
@@ -127,7 +135,7 @@ const blocksVertexAttributeName = computed<string | undefined>({
|
|
|
127
135
|
},
|
|
128
136
|
});
|
|
129
137
|
|
|
130
|
-
const blocksVertexAttributeTimeStep = computed<
|
|
138
|
+
const blocksVertexAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
131
139
|
get: () => dataStyleStore.modelBlocksVertexAttributeTimeStep(modelId, referenceBlockId.value),
|
|
132
140
|
set: async (newValue) => {
|
|
133
141
|
if (newValue === undefined) {
|
|
@@ -138,7 +146,7 @@ const blocksVertexAttributeTimeStep = computed<number | undefined>({
|
|
|
138
146
|
},
|
|
139
147
|
});
|
|
140
148
|
|
|
141
|
-
const blocksVertexAttributeItem = computed<
|
|
149
|
+
const blocksVertexAttributeItem = computed<AttributeItem>({
|
|
142
150
|
get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId, referenceBlockId.value),
|
|
143
151
|
set: async (newValue) => {
|
|
144
152
|
await dataStyleStore.setModelBlocksVertexAttributeItem(modelId, targetBlockIds, newValue);
|
|
@@ -146,7 +154,7 @@ const blocksVertexAttributeItem = computed<string | undefined>({
|
|
|
146
154
|
},
|
|
147
155
|
});
|
|
148
156
|
|
|
149
|
-
const blocksVertexAttributeRange = computed<
|
|
157
|
+
const blocksVertexAttributeRange = computed<AttributeRange>({
|
|
150
158
|
get: () => dataStyleStore.modelBlocksVertexAttributeRange(modelId, referenceBlockId.value),
|
|
151
159
|
set: async (newValue) => {
|
|
152
160
|
const [minimum, maximum] = newValue;
|
|
@@ -183,7 +191,7 @@ const blocksVertexAttributeNoDataColor = computed<RGBAColor>({
|
|
|
183
191
|
},
|
|
184
192
|
});
|
|
185
193
|
|
|
186
|
-
const blocksPolyhedronAttributeName = computed<
|
|
194
|
+
const blocksPolyhedronAttributeName = computed<AttributeName | undefined>({
|
|
187
195
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeName(modelId, referenceBlockId.value),
|
|
188
196
|
set: async (newValue) => {
|
|
189
197
|
if (newValue === undefined) {
|
|
@@ -200,7 +208,7 @@ const blocksPolyhedronAttributeName = computed<string | undefined>({
|
|
|
200
208
|
},
|
|
201
209
|
});
|
|
202
210
|
|
|
203
|
-
const blocksPolyhedronAttributeTimeStep = computed<
|
|
211
|
+
const blocksPolyhedronAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
204
212
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeTimeStep(modelId, referenceBlockId.value),
|
|
205
213
|
set: async (newValue) => {
|
|
206
214
|
if (newValue === undefined) {
|
|
@@ -217,7 +225,7 @@ const blocksPolyhedronAttributeTimeStep = computed<number | undefined>({
|
|
|
217
225
|
},
|
|
218
226
|
});
|
|
219
227
|
|
|
220
|
-
const blocksPolyhedronAttributeItem = computed<
|
|
228
|
+
const blocksPolyhedronAttributeItem = computed<AttributeItem>({
|
|
221
229
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, referenceBlockId.value),
|
|
222
230
|
set: async (newValue) => {
|
|
223
231
|
const applied = await dataStyleStore.setModelBlocksPolyhedronAttributeItem(
|
|
@@ -231,7 +239,7 @@ const blocksPolyhedronAttributeItem = computed<string | undefined>({
|
|
|
231
239
|
},
|
|
232
240
|
});
|
|
233
241
|
|
|
234
|
-
const blocksPolyhedronAttributeRange = computed<
|
|
242
|
+
const blocksPolyhedronAttributeRange = computed<AttributeRange>({
|
|
235
243
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeRange(modelId, referenceBlockId.value),
|
|
236
244
|
set: async (newValue) => {
|
|
237
245
|
const [minimum, maximum] = newValue;
|
|
@@ -280,7 +288,7 @@ const blocksPolyhedronAttributeNoDataColor = computed<RGBAColor>({
|
|
|
280
288
|
});
|
|
281
289
|
|
|
282
290
|
// Individual Attributes
|
|
283
|
-
const vertexAttributeName = computed<
|
|
291
|
+
const vertexAttributeName = computed<AttributeName | undefined>({
|
|
284
292
|
get: () => dataStyleStore.modelBlocksVertexAttributeName(modelId, blockId),
|
|
285
293
|
set: async (newValue) => {
|
|
286
294
|
if (blockId === undefined || newValue === undefined) {
|
|
@@ -291,7 +299,7 @@ const vertexAttributeName = computed<string | undefined>({
|
|
|
291
299
|
},
|
|
292
300
|
});
|
|
293
301
|
|
|
294
|
-
const vertexAttributeTimeStep = computed<
|
|
302
|
+
const vertexAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
295
303
|
get: () => dataStyleStore.modelBlocksVertexAttributeTimeStep(modelId, blockId),
|
|
296
304
|
set: async (newValue) => {
|
|
297
305
|
if (blockId === undefined || newValue === undefined) {
|
|
@@ -302,7 +310,7 @@ const vertexAttributeTimeStep = computed<number | undefined>({
|
|
|
302
310
|
},
|
|
303
311
|
});
|
|
304
312
|
|
|
305
|
-
const vertexAttributeItem = computed<
|
|
313
|
+
const vertexAttributeItem = computed<AttributeItem>({
|
|
306
314
|
get: () => dataStyleStore.modelBlocksVertexAttributeItem(modelId, blockId),
|
|
307
315
|
set: async (newValue) => {
|
|
308
316
|
if (blockId === undefined) {
|
|
@@ -313,7 +321,7 @@ const vertexAttributeItem = computed<string | undefined>({
|
|
|
313
321
|
},
|
|
314
322
|
});
|
|
315
323
|
|
|
316
|
-
const vertexAttributeRange = computed<
|
|
324
|
+
const vertexAttributeRange = computed<AttributeRange>({
|
|
317
325
|
get: () => dataStyleStore.modelBlocksVertexAttributeRange(modelId, blockId),
|
|
318
326
|
set: async (newValue) => {
|
|
319
327
|
const [minimum, maximum] = newValue;
|
|
@@ -347,7 +355,7 @@ const vertexAttributeNoDataColor = computed<RGBAColor>({
|
|
|
347
355
|
},
|
|
348
356
|
});
|
|
349
357
|
|
|
350
|
-
const polyhedronAttributeName = computed<
|
|
358
|
+
const polyhedronAttributeName = computed<AttributeName | undefined>({
|
|
351
359
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeName(modelId, blockId),
|
|
352
360
|
set: async (newValue) => {
|
|
353
361
|
if (blockId === undefined || newValue === undefined) {
|
|
@@ -364,7 +372,7 @@ const polyhedronAttributeName = computed<string | undefined>({
|
|
|
364
372
|
},
|
|
365
373
|
});
|
|
366
374
|
|
|
367
|
-
const polyhedronAttributeTimeStep = computed<
|
|
375
|
+
const polyhedronAttributeTimeStep = computed<AttributeTimeStep | undefined>({
|
|
368
376
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeTimeStep(modelId, blockId),
|
|
369
377
|
set: async (newValue) => {
|
|
370
378
|
if (blockId === undefined || newValue === undefined) {
|
|
@@ -381,7 +389,7 @@ const polyhedronAttributeTimeStep = computed<number | undefined>({
|
|
|
381
389
|
},
|
|
382
390
|
});
|
|
383
391
|
|
|
384
|
-
const polyhedronAttributeItem = computed<
|
|
392
|
+
const polyhedronAttributeItem = computed<AttributeItem>({
|
|
385
393
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeItem(modelId, blockId),
|
|
386
394
|
set: async (newValue) => {
|
|
387
395
|
if (blockId === undefined) {
|
|
@@ -398,7 +406,7 @@ const polyhedronAttributeItem = computed<string | undefined>({
|
|
|
398
406
|
},
|
|
399
407
|
});
|
|
400
408
|
|
|
401
|
-
const polyhedronAttributeRange = computed<
|
|
409
|
+
const polyhedronAttributeRange = computed<AttributeRange>({
|
|
402
410
|
get: () => dataStyleStore.modelBlocksPolyhedronAttributeRange(modelId, blockId),
|
|
403
411
|
set: async (newValue) => {
|
|
404
412
|
const [minimum, maximum] = newValue;
|
|
@@ -478,7 +486,7 @@ const attributeSchemas = {
|
|
|
478
486
|
<div v-show="!activeTab || activeTab === 'type'" data-testid="modelComponentTypeOptions">
|
|
479
487
|
<VisibilitySwitch data-testid="modelBlocksVisibilitySwitch" v-model="blocksVisibility" />
|
|
480
488
|
<ViewerOptionsColoringTypeSelector
|
|
481
|
-
:id="modelId"
|
|
489
|
+
:data-id="modelId"
|
|
482
490
|
:componentIds="targetBlockIds"
|
|
483
491
|
v-model:coloring_style_key="blocksActiveColoring"
|
|
484
492
|
v-model:color="blocksColor"
|
|
@@ -507,7 +515,7 @@ const attributeSchemas = {
|
|
|
507
515
|
>
|
|
508
516
|
<VisibilitySwitch v-model="blockVisibility" />
|
|
509
517
|
<ViewerOptionsColoringTypeSelector
|
|
510
|
-
:id="modelId"
|
|
518
|
+
:data-id="modelId"
|
|
511
519
|
:componentIds="blockComponentIds"
|
|
512
520
|
v-model:coloring_style_key="blockActiveColoring"
|
|
513
521
|
v-model:color="blockColor"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { AttributeColorMap, AttributeItem, AttributeName } from "@ogw_front/types/attribute";
|
|
3
|
+
import type { Visibility, Width } from "@ogw_front/types/style";
|
|
2
4
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
3
5
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
4
6
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
|
|
@@ -86,7 +88,7 @@ async function applyEdgesStyle(
|
|
|
86
88
|
hybridViewerStore.remoteRender();
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
const visibility = computed<
|
|
91
|
+
const visibility = computed<Visibility | undefined>({
|
|
90
92
|
get: () => edgesStyle.value?.visibility(modelId, referenceComponentId),
|
|
91
93
|
set: async (newValue) => {
|
|
92
94
|
if (newValue === undefined) {
|
|
@@ -96,7 +98,7 @@ const visibility = computed<boolean | undefined>({
|
|
|
96
98
|
},
|
|
97
99
|
});
|
|
98
100
|
|
|
99
|
-
const width = computed<
|
|
101
|
+
const width = computed<Width | undefined>({
|
|
100
102
|
get: () => edgesStyle.value?.width(modelId, referenceComponentId),
|
|
101
103
|
set: async (newValue) => {
|
|
102
104
|
if (newValue === undefined) {
|
|
@@ -126,7 +128,7 @@ const color = computed<RGBAColor | undefined>({
|
|
|
126
128
|
},
|
|
127
129
|
});
|
|
128
130
|
|
|
129
|
-
const vertexAttributeName = computed<
|
|
131
|
+
const vertexAttributeName = computed<AttributeName | undefined>({
|
|
130
132
|
get: () => edgesStyle.value?.vertexAttributeName(modelId, referenceComponentId),
|
|
131
133
|
set: async (newValue) => {
|
|
132
134
|
if (newValue === undefined) {
|
|
@@ -136,7 +138,7 @@ const vertexAttributeName = computed<string | undefined>({
|
|
|
136
138
|
},
|
|
137
139
|
});
|
|
138
140
|
|
|
139
|
-
const vertexAttributeItem = computed<
|
|
141
|
+
const vertexAttributeItem = computed<AttributeItem | undefined>({
|
|
140
142
|
get: () => edgesStyle.value?.vertexAttributeItem(modelId, referenceComponentId),
|
|
141
143
|
set: async (newValue) => {
|
|
142
144
|
if (newValue === undefined) {
|
|
@@ -162,7 +164,7 @@ const vertexAttributeRange = computed<(number | undefined)[] | undefined>({
|
|
|
162
164
|
},
|
|
163
165
|
});
|
|
164
166
|
|
|
165
|
-
const vertexAttributeColorMap = computed<
|
|
167
|
+
const vertexAttributeColorMap = computed<AttributeColorMap | undefined>({
|
|
166
168
|
get: () => edgesStyle.value?.vertexAttributeColorMap(modelId, referenceComponentId),
|
|
167
169
|
set: async (newValue) => {
|
|
168
170
|
await applyEdgesStyle((style, ids) => style.setVertexAttributeColorMap(modelId, ids, newValue));
|
|
@@ -206,7 +208,7 @@ const attributeSchemas = {
|
|
|
206
208
|
<template v-if="visibility">
|
|
207
209
|
<ViewerOptionsWidthSlider data-testid="modelComponentEdgesWidthSlider" v-model="width" />
|
|
208
210
|
<ViewerOptionsColoringTypeSelector
|
|
209
|
-
:id="modelId"
|
|
211
|
+
:data-id="modelId"
|
|
210
212
|
:componentIds="allComponentIds"
|
|
211
213
|
v-model:coloring_style_key="activeColoring"
|
|
212
214
|
v-model:color="color"
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { AttributeColorMap, AttributeItem, AttributeName } from "@ogw_front/types/attribute";
|
|
3
|
+
import type { Size, Visibility } from "@ogw_front/types/style";
|
|
2
4
|
import { MODEL_VERTEX_COLORING } from "@ogw_front/utils/model_component_coloring";
|
|
3
5
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
4
6
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
@@ -106,7 +108,7 @@ async function applyPointsStyle(
|
|
|
106
108
|
hybridViewerStore.remoteRender();
|
|
107
109
|
}
|
|
108
110
|
|
|
109
|
-
const visibility = computed<
|
|
111
|
+
const visibility = computed<Visibility | undefined>({
|
|
110
112
|
get: () => pointsStyle.value?.visibility(modelId, referenceComponentId),
|
|
111
113
|
set: async (newValue) => {
|
|
112
114
|
if (newValue === undefined) {
|
|
@@ -116,7 +118,7 @@ const visibility = computed<boolean | undefined>({
|
|
|
116
118
|
},
|
|
117
119
|
});
|
|
118
120
|
|
|
119
|
-
const size = computed<
|
|
121
|
+
const size = computed<Size | undefined>({
|
|
120
122
|
get: () => pointsStyle.value?.size(modelId, referenceComponentId),
|
|
121
123
|
set: async (newValue) => {
|
|
122
124
|
if (newValue === undefined) {
|
|
@@ -146,7 +148,7 @@ const color = computed<RGBAColor | undefined>({
|
|
|
146
148
|
},
|
|
147
149
|
});
|
|
148
150
|
|
|
149
|
-
const vertexAttributeName = computed<
|
|
151
|
+
const vertexAttributeName = computed<AttributeName | undefined>({
|
|
150
152
|
get: () => pointsStyle.value?.vertexAttributeName(modelId, referenceComponentId),
|
|
151
153
|
set: async (newValue) => {
|
|
152
154
|
if (newValue === undefined) {
|
|
@@ -156,7 +158,7 @@ const vertexAttributeName = computed<string | undefined>({
|
|
|
156
158
|
},
|
|
157
159
|
});
|
|
158
160
|
|
|
159
|
-
const vertexAttributeItem = computed<
|
|
161
|
+
const vertexAttributeItem = computed<AttributeItem | undefined>({
|
|
160
162
|
get: () => pointsStyle.value?.vertexAttributeItem(modelId, referenceComponentId),
|
|
161
163
|
set: async (newValue) => {
|
|
162
164
|
if (newValue === undefined) {
|
|
@@ -182,7 +184,7 @@ const vertexAttributeRange = computed<(number | undefined)[] | undefined>({
|
|
|
182
184
|
},
|
|
183
185
|
});
|
|
184
186
|
|
|
185
|
-
const vertexAttributeColorMap = computed<
|
|
187
|
+
const vertexAttributeColorMap = computed<AttributeColorMap | undefined>({
|
|
186
188
|
get: () => pointsStyle.value?.vertexAttributeColorMap(modelId, referenceComponentId),
|
|
187
189
|
set: async (newValue) => {
|
|
188
190
|
await applyPointsStyle((style, ids) =>
|
|
@@ -212,7 +214,7 @@ const { capabilities, schemas: attributeSchemas } = MODEL_VERTEX_COLORING;
|
|
|
212
214
|
<template v-if="visibility">
|
|
213
215
|
<ViewerOptionsSizeSlider data-testid="modelComponentPointsSizeSlider" v-model="size" />
|
|
214
216
|
<ViewerOptionsColoringTypeSelector
|
|
215
|
-
:id="modelId"
|
|
217
|
+
:data-id="modelId"
|
|
216
218
|
:componentIds="allComponentIds"
|
|
217
219
|
v-model:coloring_style_key="activeColoring"
|
|
218
220
|
v-model:color="color"
|