@geode/opengeodeweb-front 10.44.0-rc.9 → 10.44.1-rc.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/ClippingPlaneCard.vue +18 -1
- package/app/components/ClippingPlanes.vue +21 -10
- 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/Screenshot.vue +8 -57
- 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/CircularItems.vue +1 -2
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +7 -6
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +4 -5
- 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/Scene/BackgroundOptions.vue +37 -0
- package/app/components/Viewer/Scene/OrientationWidgetOptions.vue +48 -0
- package/app/components/Viewer/Scene/TextOptions.vue +63 -0
- 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_planes_widget_entries.ts +1 -0
- 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 +12 -10
- package/app/composables/viewer_context_menu.ts +9 -1
- 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 +34 -20
- package/app/stores/menu.ts +24 -11
- package/app/stores/menu_helpers/menus_data.ts +2 -0
- package/app/stores/menu_helpers/scene.ts +10 -0
- 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 +25 -5
- package/app/utils/clipping_planes_scene.ts +4 -3
- package/app/utils/crs.ts +4 -1
- package/app/utils/default_styles/constants.ts +18 -1
- package/app/utils/default_styles/index.ts +17 -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/base_database.ts +2 -0
- 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/database/tables/scene_style.ts +6 -0
- 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/scene.ts +118 -0
- package/internal/stores/data_style/state.ts +11 -6
- package/internal/stores/data_style/state_shared.ts +20 -11
- package/internal/stores/data_style/time_step.ts +21 -15
- package/internal/stores/data_style/types.ts +28 -4
- 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,201 +1,204 @@
|
|
|
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";
|
|
17
|
+
import type { Texture } from "@ogw_front/types/texture";
|
|
8
18
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
9
19
|
import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
|
|
10
20
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
11
21
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
12
22
|
|
|
13
|
-
interface Texture {
|
|
14
|
-
id: string;
|
|
15
|
-
texture_name: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
23
|
const dataStyleStore = useDataStyleStore();
|
|
19
24
|
const hybridViewerStore = useHybridViewerStore();
|
|
20
25
|
const { applyBatchStyle } = useBatchStyle();
|
|
21
26
|
|
|
22
27
|
interface Props {
|
|
23
|
-
|
|
28
|
+
dataId: DataId;
|
|
24
29
|
capabilities: Record<string, { available?: boolean; hasColorMap?: boolean }>;
|
|
25
30
|
}
|
|
26
31
|
|
|
27
|
-
const {
|
|
32
|
+
const { dataId, capabilities } = defineProps<Props>();
|
|
28
33
|
|
|
29
34
|
const coloring_style_key = computed<string>({
|
|
30
|
-
get: () => dataStyleStore.meshPolygonsActiveColoring(
|
|
35
|
+
get: () => dataStyleStore.meshPolygonsActiveColoring(dataId),
|
|
31
36
|
set: async (newValue) => {
|
|
32
|
-
await applyBatchStyle(
|
|
33
|
-
dataStyleStore.setMeshPolygonsActiveColoring(
|
|
37
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
38
|
+
dataStyleStore.setMeshPolygonsActiveColoring(meshId, newValue),
|
|
34
39
|
);
|
|
35
40
|
hybridViewerStore.remoteRender();
|
|
36
41
|
},
|
|
37
42
|
});
|
|
38
43
|
const color = useBatchStyleModel<RGBAColor>(
|
|
39
|
-
() =>
|
|
40
|
-
(
|
|
41
|
-
(
|
|
44
|
+
() => dataId,
|
|
45
|
+
(meshId) => dataStyleStore.meshPolygonsColor(meshId) as RGBAColor | undefined,
|
|
46
|
+
(meshId, value) => dataStyleStore.setMeshPolygonsColor(meshId, value),
|
|
42
47
|
);
|
|
43
|
-
const opacity = useBatchStyleModel<
|
|
44
|
-
() =>
|
|
45
|
-
(
|
|
46
|
-
(
|
|
48
|
+
const opacity = useBatchStyleModel<Opacity>(
|
|
49
|
+
() => dataId,
|
|
50
|
+
(meshId) => dataStyleStore.meshPolygonsOpacity(meshId),
|
|
51
|
+
(meshId, value) => dataStyleStore.setMeshPolygonsOpacity(meshId, value),
|
|
47
52
|
);
|
|
48
53
|
const textures = useBatchStyleModel<Texture[]>(
|
|
49
|
-
() =>
|
|
50
|
-
(
|
|
51
|
-
(
|
|
54
|
+
() => dataId,
|
|
55
|
+
(meshId) => dataStyleStore.meshPolygonsTextures(meshId) as Texture[] | undefined,
|
|
56
|
+
(meshId, value) => dataStyleStore.setMeshPolygonsTextures(meshId, value),
|
|
52
57
|
);
|
|
53
58
|
|
|
54
|
-
const vertex_attribute_name = computed<
|
|
55
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeName(
|
|
59
|
+
const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
60
|
+
get: () => dataStyleStore.meshPolygonsVertexAttributeName(dataId),
|
|
56
61
|
set: async (newValue) => {
|
|
57
62
|
if (newValue === undefined) {
|
|
58
63
|
return;
|
|
59
64
|
}
|
|
60
|
-
await applyBatchStyle(
|
|
61
|
-
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeName(
|
|
65
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
66
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeName(meshId, newValue)),
|
|
62
67
|
);
|
|
63
68
|
hybridViewerStore.remoteRender();
|
|
64
69
|
},
|
|
65
70
|
});
|
|
66
71
|
|
|
67
|
-
const vertex_attribute_time_step = computed<
|
|
68
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeTimeStep(
|
|
72
|
+
const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
73
|
+
get: () => dataStyleStore.meshPolygonsVertexAttributeTimeStep(dataId),
|
|
69
74
|
set: async (newValue) => {
|
|
70
75
|
if (newValue === undefined) {
|
|
71
76
|
return;
|
|
72
77
|
}
|
|
73
|
-
await applyBatchStyle(
|
|
74
|
-
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeTimeStep(
|
|
78
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
79
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeTimeStep(meshId, newValue)),
|
|
75
80
|
);
|
|
76
81
|
hybridViewerStore.remoteRender();
|
|
77
82
|
},
|
|
78
83
|
});
|
|
79
|
-
const vertex_attribute_item = computed<
|
|
80
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeItem(
|
|
84
|
+
const vertex_attribute_item = computed<AttributeItem>({
|
|
85
|
+
get: () => dataStyleStore.meshPolygonsVertexAttributeItem(dataId),
|
|
81
86
|
set: async (newValue) => {
|
|
82
|
-
await applyBatchStyle(
|
|
83
|
-
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeItem(
|
|
87
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
88
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeItem(meshId, newValue)),
|
|
84
89
|
);
|
|
85
90
|
hybridViewerStore.remoteRender();
|
|
86
91
|
},
|
|
87
92
|
});
|
|
88
|
-
const vertex_attribute_range = computed<
|
|
89
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeRange(
|
|
93
|
+
const vertex_attribute_range = computed<AttributeRange>({
|
|
94
|
+
get: () => dataStyleStore.meshPolygonsVertexAttributeRange(dataId),
|
|
90
95
|
set: async (newValue) => {
|
|
91
96
|
const [minimum, maximum] = newValue;
|
|
92
97
|
if (minimum === undefined || maximum === undefined) {
|
|
93
98
|
return;
|
|
94
99
|
}
|
|
95
|
-
await applyBatchStyle(
|
|
96
|
-
Promise.resolve(
|
|
97
|
-
dataStyleStore.setMeshPolygonsVertexAttributeRange(targetId, minimum, maximum),
|
|
98
|
-
),
|
|
100
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
101
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeRange(meshId, minimum, maximum)),
|
|
99
102
|
);
|
|
100
103
|
hybridViewerStore.remoteRender();
|
|
101
104
|
},
|
|
102
105
|
});
|
|
103
|
-
const vertex_attribute_color_map = computed<
|
|
104
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeColorMap(
|
|
106
|
+
const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
107
|
+
get: () => dataStyleStore.meshPolygonsVertexAttributeColorMap(dataId),
|
|
105
108
|
set: async (newValue) => {
|
|
106
|
-
await applyBatchStyle(
|
|
107
|
-
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeColorMap(
|
|
109
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
110
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsVertexAttributeColorMap(meshId, newValue)),
|
|
108
111
|
);
|
|
109
112
|
hybridViewerStore.remoteRender();
|
|
110
113
|
},
|
|
111
114
|
});
|
|
112
115
|
const vertex_attribute_no_data_color = computed<RGBAColor>({
|
|
113
|
-
get: () => dataStyleStore.meshPolygonsVertexAttributeNoDataColor(
|
|
116
|
+
get: () => dataStyleStore.meshPolygonsVertexAttributeNoDataColor(dataId),
|
|
114
117
|
set: async (newValue) => {
|
|
115
|
-
await applyBatchStyle(
|
|
116
|
-
dataStyleStore.setMeshPolygonsVertexAttributeNoDataColor(
|
|
118
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
119
|
+
dataStyleStore.setMeshPolygonsVertexAttributeNoDataColor(meshId, newValue),
|
|
117
120
|
);
|
|
118
121
|
hybridViewerStore.remoteRender();
|
|
119
122
|
},
|
|
120
123
|
});
|
|
121
|
-
const polygon_attribute_name = computed<
|
|
122
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeName(
|
|
124
|
+
const polygon_attribute_name = computed<AttributeName | undefined>({
|
|
125
|
+
get: () => dataStyleStore.meshPolygonsPolygonAttributeName(dataId),
|
|
123
126
|
set: async (newValue) => {
|
|
124
127
|
if (newValue === undefined) {
|
|
125
128
|
return;
|
|
126
129
|
}
|
|
127
|
-
await applyBatchStyle(
|
|
128
|
-
Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeName(
|
|
130
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
131
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeName(meshId, newValue)),
|
|
129
132
|
);
|
|
130
133
|
hybridViewerStore.remoteRender();
|
|
131
134
|
},
|
|
132
135
|
});
|
|
133
136
|
|
|
134
|
-
const polygon_attribute_time_step = computed<
|
|
135
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeTimeStep(
|
|
137
|
+
const polygon_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
138
|
+
get: () => dataStyleStore.meshPolygonsPolygonAttributeTimeStep(dataId),
|
|
136
139
|
set: async (newValue) => {
|
|
137
140
|
if (newValue === undefined) {
|
|
138
141
|
return;
|
|
139
142
|
}
|
|
140
|
-
await applyBatchStyle(
|
|
141
|
-
Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeTimeStep(
|
|
143
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
144
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeTimeStep(meshId, newValue)),
|
|
142
145
|
);
|
|
143
146
|
hybridViewerStore.remoteRender();
|
|
144
147
|
},
|
|
145
148
|
});
|
|
146
|
-
const polygon_attribute_item = computed<
|
|
147
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeItem(
|
|
149
|
+
const polygon_attribute_item = computed<AttributeItem>({
|
|
150
|
+
get: () => dataStyleStore.meshPolygonsPolygonAttributeItem(dataId),
|
|
148
151
|
set: async (newValue) => {
|
|
149
|
-
await applyBatchStyle(
|
|
150
|
-
Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeItem(
|
|
152
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
153
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeItem(meshId, newValue)),
|
|
151
154
|
);
|
|
152
155
|
hybridViewerStore.remoteRender();
|
|
153
156
|
},
|
|
154
157
|
});
|
|
155
|
-
const polygon_attribute_range = computed<
|
|
156
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeRange(
|
|
158
|
+
const polygon_attribute_range = computed<AttributeRange>({
|
|
159
|
+
get: () => dataStyleStore.meshPolygonsPolygonAttributeRange(dataId),
|
|
157
160
|
set: async (newValue) => {
|
|
158
161
|
const [minimum, maximum] = newValue;
|
|
159
162
|
if (minimum === undefined || maximum === undefined) {
|
|
160
163
|
return;
|
|
161
164
|
}
|
|
162
|
-
await applyBatchStyle(
|
|
165
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
163
166
|
Promise.resolve(
|
|
164
|
-
dataStyleStore.setMeshPolygonsPolygonAttributeRange(
|
|
167
|
+
dataStyleStore.setMeshPolygonsPolygonAttributeRange(meshId, minimum, maximum),
|
|
165
168
|
),
|
|
166
169
|
);
|
|
167
170
|
hybridViewerStore.remoteRender();
|
|
168
171
|
},
|
|
169
172
|
});
|
|
170
|
-
const polygon_attribute_color_map = computed<
|
|
171
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeColorMap(
|
|
173
|
+
const polygon_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
174
|
+
get: () => dataStyleStore.meshPolygonsPolygonAttributeColorMap(dataId),
|
|
172
175
|
set: async (newValue) => {
|
|
173
|
-
await applyBatchStyle(
|
|
174
|
-
Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeColorMap(
|
|
176
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
177
|
+
Promise.resolve(dataStyleStore.setMeshPolygonsPolygonAttributeColorMap(meshId, newValue)),
|
|
175
178
|
);
|
|
176
179
|
hybridViewerStore.remoteRender();
|
|
177
180
|
},
|
|
178
181
|
});
|
|
179
182
|
const polygon_attribute_no_data_color = computed<RGBAColor>({
|
|
180
|
-
get: () => dataStyleStore.meshPolygonsPolygonAttributeNoDataColor(
|
|
183
|
+
get: () => dataStyleStore.meshPolygonsPolygonAttributeNoDataColor(dataId),
|
|
181
184
|
set: async (newValue) => {
|
|
182
|
-
await applyBatchStyle(
|
|
183
|
-
dataStyleStore.setMeshPolygonsPolygonAttributeNoDataColor(
|
|
185
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
186
|
+
dataStyleStore.setMeshPolygonsPolygonAttributeNoDataColor(meshId, newValue),
|
|
184
187
|
);
|
|
185
188
|
hybridViewerStore.remoteRender();
|
|
186
189
|
},
|
|
187
190
|
});
|
|
188
191
|
|
|
189
192
|
async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
190
|
-
await applyRangesPerData(ranges, (
|
|
191
|
-
dataStyleStore.setMeshPolygonsVertexAttributeRange(
|
|
193
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
194
|
+
dataStyleStore.setMeshPolygonsVertexAttributeRange(meshId, minimum, maximum),
|
|
192
195
|
);
|
|
193
196
|
hybridViewerStore.remoteRender();
|
|
194
197
|
}
|
|
195
198
|
|
|
196
199
|
async function setPolygonAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
197
|
-
await applyRangesPerData(ranges, (
|
|
198
|
-
dataStyleStore.setMeshPolygonsPolygonAttributeRange(
|
|
200
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
201
|
+
dataStyleStore.setMeshPolygonsPolygonAttributeRange(meshId, minimum, maximum),
|
|
199
202
|
);
|
|
200
203
|
hybridViewerStore.remoteRender();
|
|
201
204
|
}
|
|
@@ -203,7 +206,7 @@ async function setPolygonAttributeRangesPerData(ranges: RangesPerData): Promise<
|
|
|
203
206
|
|
|
204
207
|
<template>
|
|
205
208
|
<ViewerOptionsColoringTypeSelector
|
|
206
|
-
:id="
|
|
209
|
+
:data-id="dataId"
|
|
207
210
|
v-model:coloring_style_key="coloring_style_key"
|
|
208
211
|
v-model:color="color"
|
|
209
212
|
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 ViewerGenericMeshPolygonsColoring from "@ogw_front/components/Viewer/Generic/Mesh/PolygonsColoring.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";
|
|
@@ -31,13 +33,13 @@ const {
|
|
|
31
33
|
capabilities = {},
|
|
32
34
|
} = defineProps<Props>();
|
|
33
35
|
|
|
34
|
-
const
|
|
36
|
+
const dataId = toRef(() => itemProps.id);
|
|
35
37
|
|
|
36
|
-
const visibility = computed<
|
|
37
|
-
get: () => dataStyleStore.meshPolygonsVisibility(
|
|
38
|
+
const visibility = computed<Visibility>({
|
|
39
|
+
get: () => dataStyleStore.meshPolygonsVisibility(dataId.value),
|
|
38
40
|
set: async (newValue) => {
|
|
39
|
-
await applyBatchStyle(
|
|
40
|
-
dataStyleStore.setMeshPolygonsVisibility(
|
|
41
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
42
|
+
dataStyleStore.setMeshPolygonsVisibility(meshId, newValue),
|
|
41
43
|
);
|
|
42
44
|
hybridViewerStore.remoteRender();
|
|
43
45
|
},
|
|
@@ -59,7 +61,7 @@ const visibility = computed<boolean>({
|
|
|
59
61
|
/>
|
|
60
62
|
<template v-if="visibility">
|
|
61
63
|
<v-divider />
|
|
62
|
-
<ViewerGenericMeshPolygonsColoring :id="
|
|
64
|
+
<ViewerGenericMeshPolygonsColoring :data-id="dataId" :capabilities="capabilities" />
|
|
63
65
|
</template>
|
|
64
66
|
</template>
|
|
65
67
|
</ViewerContextMenuItem>
|
|
@@ -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>
|