@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
|
@@ -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 ViewerGenericMeshCellsColoring from "@ogw_front/components/Viewer/Generic/Mesh/CellsColoring.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 = "Cells options" } = defineProps<Props>();
|
|
22
24
|
|
|
23
|
-
const
|
|
25
|
+
const dataId = toRef(() => itemProps.id);
|
|
24
26
|
|
|
25
|
-
const visibility = computed<
|
|
26
|
-
get: () => dataStyleStore.meshCellsVisibility(
|
|
27
|
+
const visibility = computed<Visibility>({
|
|
28
|
+
get: () => dataStyleStore.meshCellsVisibility(dataId.value),
|
|
27
29
|
set: async (newValue) => {
|
|
28
|
-
await applyBatchStyle(
|
|
29
|
-
dataStyleStore.setMeshCellsVisibility(
|
|
30
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
31
|
+
dataStyleStore.setMeshCellsVisibility(meshId, newValue),
|
|
30
32
|
);
|
|
31
33
|
hybridViewerStore.remoteRender();
|
|
32
34
|
},
|
|
@@ -45,7 +47,7 @@ const visibility = computed<boolean>({
|
|
|
45
47
|
<ViewerOptionsVisibilitySwitch data-testid="meshCellsVisibilitySwitch" v-model="visibility" />
|
|
46
48
|
<template v-if="visibility">
|
|
47
49
|
<v-divider />
|
|
48
|
-
<ViewerGenericMeshCellsColoring :id="
|
|
50
|
+
<ViewerGenericMeshCellsColoring :data-id="dataId" />
|
|
49
51
|
</template>
|
|
50
52
|
</template>
|
|
51
53
|
</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,172 +24,172 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
15
24
|
const { applyBatchStyle } = useBatchStyle();
|
|
16
25
|
|
|
17
26
|
interface Props {
|
|
18
|
-
|
|
27
|
+
dataId: DataId;
|
|
19
28
|
capabilities: Record<string, { available?: boolean; hasColorMap?: boolean }>;
|
|
20
29
|
}
|
|
21
30
|
|
|
22
|
-
const {
|
|
31
|
+
const { dataId, capabilities } = defineProps<Props>();
|
|
23
32
|
|
|
24
33
|
const coloring_style_key = computed<string>({
|
|
25
|
-
get: () => dataStyleStore.meshEdgesActiveColoring(
|
|
34
|
+
get: () => dataStyleStore.meshEdgesActiveColoring(dataId),
|
|
26
35
|
set: async (newValue) => {
|
|
27
|
-
await applyBatchStyle(
|
|
28
|
-
dataStyleStore.setMeshEdgesActiveColoring(
|
|
36
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
37
|
+
dataStyleStore.setMeshEdgesActiveColoring(meshId, newValue),
|
|
29
38
|
);
|
|
30
39
|
hybridViewerStore.remoteRender();
|
|
31
40
|
},
|
|
32
41
|
});
|
|
33
42
|
const color = useBatchStyleModel<RGBAColor>(
|
|
34
|
-
() =>
|
|
35
|
-
(
|
|
36
|
-
(
|
|
43
|
+
() => dataId,
|
|
44
|
+
(meshId) => dataStyleStore.meshEdgesColor(meshId) as RGBAColor | undefined,
|
|
45
|
+
(meshId, value) => dataStyleStore.setMeshEdgesColor(meshId, value),
|
|
37
46
|
);
|
|
38
|
-
const opacity = useBatchStyleModel<
|
|
39
|
-
() =>
|
|
40
|
-
(
|
|
41
|
-
(
|
|
47
|
+
const opacity = useBatchStyleModel<Opacity>(
|
|
48
|
+
() => dataId,
|
|
49
|
+
(meshId) => dataStyleStore.meshEdgesOpacity(meshId),
|
|
50
|
+
(meshId, value) => dataStyleStore.setMeshEdgesOpacity(meshId, value),
|
|
42
51
|
);
|
|
43
|
-
const vertex_attribute_name = computed<
|
|
44
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeName(
|
|
52
|
+
const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
53
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeName(dataId),
|
|
45
54
|
set: async (newValue) => {
|
|
46
55
|
if (newValue === undefined) {
|
|
47
56
|
return;
|
|
48
57
|
}
|
|
49
|
-
await applyBatchStyle(
|
|
50
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeName(
|
|
58
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
59
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeName(meshId, newValue)),
|
|
51
60
|
);
|
|
52
61
|
hybridViewerStore.remoteRender();
|
|
53
62
|
},
|
|
54
63
|
});
|
|
55
64
|
|
|
56
|
-
const vertex_attribute_time_step = computed<
|
|
57
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeTimeStep(
|
|
65
|
+
const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
66
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeTimeStep(dataId),
|
|
58
67
|
set: async (newValue) => {
|
|
59
68
|
if (newValue === undefined) {
|
|
60
69
|
return;
|
|
61
70
|
}
|
|
62
|
-
await applyBatchStyle(
|
|
63
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeTimeStep(
|
|
71
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
72
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeTimeStep(meshId, newValue)),
|
|
64
73
|
);
|
|
65
74
|
hybridViewerStore.remoteRender();
|
|
66
75
|
},
|
|
67
76
|
});
|
|
68
|
-
const vertex_attribute_item = computed<
|
|
69
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeItem(
|
|
77
|
+
const vertex_attribute_item = computed<AttributeItem>({
|
|
78
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeItem(dataId),
|
|
70
79
|
set: async (newValue) => {
|
|
71
|
-
await applyBatchStyle(
|
|
72
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeItem(
|
|
80
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
81
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeItem(meshId, newValue)),
|
|
73
82
|
);
|
|
74
83
|
hybridViewerStore.remoteRender();
|
|
75
84
|
},
|
|
76
85
|
});
|
|
77
|
-
const vertex_attribute_range = computed<
|
|
78
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeRange(
|
|
86
|
+
const vertex_attribute_range = computed<AttributeRange>({
|
|
87
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeRange(dataId),
|
|
79
88
|
set: async (newValue) => {
|
|
80
89
|
const [minimum, maximum] = newValue;
|
|
81
90
|
if (minimum === undefined || maximum === undefined) {
|
|
82
91
|
return;
|
|
83
92
|
}
|
|
84
|
-
await applyBatchStyle(
|
|
85
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeRange(
|
|
93
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
94
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeRange(meshId, minimum, maximum)),
|
|
86
95
|
);
|
|
87
96
|
hybridViewerStore.remoteRender();
|
|
88
97
|
},
|
|
89
98
|
});
|
|
90
|
-
const vertex_attribute_color_map = computed<
|
|
91
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(
|
|
99
|
+
const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
100
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(dataId),
|
|
92
101
|
set: async (newValue) => {
|
|
93
|
-
await applyBatchStyle(
|
|
94
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeColorMap(
|
|
102
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
103
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeColorMap(meshId, newValue)),
|
|
95
104
|
);
|
|
96
105
|
hybridViewerStore.remoteRender();
|
|
97
106
|
},
|
|
98
107
|
});
|
|
99
108
|
const vertex_attribute_no_data_color = computed<RGBAColor>({
|
|
100
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(
|
|
109
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(dataId),
|
|
101
110
|
set: async (newValue) => {
|
|
102
|
-
await applyBatchStyle(
|
|
103
|
-
dataStyleStore.setMeshEdgesVertexAttributeNoDataColor(
|
|
111
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
112
|
+
dataStyleStore.setMeshEdgesVertexAttributeNoDataColor(meshId, newValue),
|
|
104
113
|
);
|
|
105
114
|
hybridViewerStore.remoteRender();
|
|
106
115
|
},
|
|
107
116
|
});
|
|
108
|
-
const edge_attribute_name = computed<
|
|
109
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeName(
|
|
117
|
+
const edge_attribute_name = computed<AttributeName | undefined>({
|
|
118
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeName(dataId),
|
|
110
119
|
set: async (newValue) => {
|
|
111
120
|
if (newValue === undefined) {
|
|
112
121
|
return;
|
|
113
122
|
}
|
|
114
|
-
await applyBatchStyle(
|
|
115
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeName(
|
|
123
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
124
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeName(meshId, newValue)),
|
|
116
125
|
);
|
|
117
126
|
hybridViewerStore.remoteRender();
|
|
118
127
|
},
|
|
119
128
|
});
|
|
120
129
|
|
|
121
|
-
const edge_attribute_time_step = computed<
|
|
122
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeTimeStep(
|
|
130
|
+
const edge_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
131
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeTimeStep(dataId),
|
|
123
132
|
set: async (newValue) => {
|
|
124
133
|
if (newValue === undefined) {
|
|
125
134
|
return;
|
|
126
135
|
}
|
|
127
|
-
await applyBatchStyle(
|
|
128
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeTimeStep(
|
|
136
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
137
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeTimeStep(meshId, newValue)),
|
|
129
138
|
);
|
|
130
139
|
hybridViewerStore.remoteRender();
|
|
131
140
|
},
|
|
132
141
|
});
|
|
133
|
-
const edge_attribute_item = computed<
|
|
134
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeItem(
|
|
142
|
+
const edge_attribute_item = computed<AttributeItem>({
|
|
143
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeItem(dataId),
|
|
135
144
|
set: async (newValue) => {
|
|
136
|
-
await applyBatchStyle(
|
|
137
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeItem(
|
|
145
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
146
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeItem(meshId, newValue)),
|
|
138
147
|
);
|
|
139
148
|
hybridViewerStore.remoteRender();
|
|
140
149
|
},
|
|
141
150
|
});
|
|
142
|
-
const edge_attribute_range = computed<
|
|
143
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeRange(
|
|
151
|
+
const edge_attribute_range = computed<AttributeRange>({
|
|
152
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeRange(dataId),
|
|
144
153
|
set: async (newValue) => {
|
|
145
154
|
const [minimum, maximum] = newValue;
|
|
146
155
|
if (minimum === undefined || maximum === undefined) {
|
|
147
156
|
return;
|
|
148
157
|
}
|
|
149
|
-
await applyBatchStyle(
|
|
150
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeRange(
|
|
158
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
159
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeRange(meshId, minimum, maximum)),
|
|
151
160
|
);
|
|
152
161
|
hybridViewerStore.remoteRender();
|
|
153
162
|
},
|
|
154
163
|
});
|
|
155
|
-
const edge_attribute_color_map = computed<
|
|
156
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(
|
|
164
|
+
const edge_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
165
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(dataId),
|
|
157
166
|
set: async (newValue) => {
|
|
158
|
-
await applyBatchStyle(
|
|
159
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeColorMap(
|
|
167
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
168
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeColorMap(meshId, newValue)),
|
|
160
169
|
);
|
|
161
170
|
hybridViewerStore.remoteRender();
|
|
162
171
|
},
|
|
163
172
|
});
|
|
164
173
|
const edge_attribute_no_data_color = computed<RGBAColor>({
|
|
165
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(
|
|
174
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(dataId),
|
|
166
175
|
set: async (newValue) => {
|
|
167
|
-
await applyBatchStyle(
|
|
168
|
-
dataStyleStore.setMeshEdgesEdgeAttributeNoDataColor(
|
|
176
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
177
|
+
dataStyleStore.setMeshEdgesEdgeAttributeNoDataColor(meshId, newValue),
|
|
169
178
|
);
|
|
170
179
|
hybridViewerStore.remoteRender();
|
|
171
180
|
},
|
|
172
181
|
});
|
|
173
182
|
|
|
174
183
|
async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
175
|
-
await applyRangesPerData(ranges, (
|
|
176
|
-
dataStyleStore.setMeshEdgesVertexAttributeRange(
|
|
184
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
185
|
+
dataStyleStore.setMeshEdgesVertexAttributeRange(meshId, minimum, maximum),
|
|
177
186
|
);
|
|
178
187
|
hybridViewerStore.remoteRender();
|
|
179
188
|
}
|
|
180
189
|
|
|
181
190
|
async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
182
|
-
await applyRangesPerData(ranges, (
|
|
183
|
-
dataStyleStore.setMeshEdgesEdgeAttributeRange(
|
|
191
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
192
|
+
dataStyleStore.setMeshEdgesEdgeAttributeRange(meshId, minimum, maximum),
|
|
184
193
|
);
|
|
185
194
|
hybridViewerStore.remoteRender();
|
|
186
195
|
}
|
|
@@ -188,7 +197,7 @@ async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<voi
|
|
|
188
197
|
|
|
189
198
|
<template>
|
|
190
199
|
<ViewerOptionsColoringTypeSelector
|
|
191
|
-
:id="
|
|
200
|
+
:data-id="dataId"
|
|
192
201
|
v-model:coloring_style_key="coloring_style_key"
|
|
193
202
|
v-model:color="color"
|
|
194
203
|
v-model:opacity="opacity"
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { Size, Visibility } from "@ogw_front/types/style";
|
|
2
3
|
import ViewerContextMenuItem, {
|
|
3
4
|
type ItemProps,
|
|
4
5
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
6
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
5
7
|
import ViewerGenericMeshEdgesColoring from "@ogw_front/components/Viewer/Generic/Mesh/EdgesColoring.vue";
|
|
6
8
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
7
9
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
|
|
@@ -27,22 +29,22 @@ interface Props {
|
|
|
27
29
|
|
|
28
30
|
const { itemProps, btnImage, tooltip = "Edges options", capabilities = {} } = defineProps<Props>();
|
|
29
31
|
|
|
30
|
-
const
|
|
32
|
+
const dataId = toRef(() => itemProps.id);
|
|
31
33
|
|
|
32
|
-
const visibility = computed<
|
|
33
|
-
get: () => dataStyleStore.meshEdgesVisibility(
|
|
34
|
+
const visibility = computed<Visibility>({
|
|
35
|
+
get: () => dataStyleStore.meshEdgesVisibility(dataId.value),
|
|
34
36
|
set: async (newValue) => {
|
|
35
|
-
await applyBatchStyle(
|
|
36
|
-
dataStyleStore.setMeshEdgesVisibility(
|
|
37
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
38
|
+
dataStyleStore.setMeshEdgesVisibility(meshId, newValue),
|
|
37
39
|
);
|
|
38
40
|
hybridViewerStore.remoteRender();
|
|
39
41
|
},
|
|
40
42
|
});
|
|
41
|
-
const size = computed<
|
|
42
|
-
get: () => dataStyleStore.meshEdgesWidth(
|
|
43
|
+
const size = computed<Size>({
|
|
44
|
+
get: () => dataStyleStore.meshEdgesWidth(dataId.value),
|
|
43
45
|
set: async (newValue) => {
|
|
44
|
-
await applyBatchStyle(
|
|
45
|
-
dataStyleStore.setMeshEdgesWidth(
|
|
46
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
47
|
+
dataStyleStore.setMeshEdgesWidth(meshId, newValue),
|
|
46
48
|
);
|
|
47
49
|
hybridViewerStore.remoteRender();
|
|
48
50
|
},
|
|
@@ -69,7 +71,7 @@ const size = computed<number>({
|
|
|
69
71
|
<template v-if="visibility">
|
|
70
72
|
<v-divider class="my-2" />
|
|
71
73
|
<ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="size" />
|
|
72
|
-
<ViewerGenericMeshEdgesColoring :id="
|
|
74
|
+
<ViewerGenericMeshEdgesColoring :data-id="dataId" :capabilities="capabilities" />
|
|
73
75
|
</template>
|
|
74
76
|
</template>
|
|
75
77
|
</ViewerContextMenuItem>
|
|
@@ -1,4 +1,12 @@
|
|
|
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 { Opacity, Size, Visibility } from "@ogw_front/types/style";
|
|
2
10
|
import {
|
|
3
11
|
type RangesPerData,
|
|
4
12
|
applyRangesPerData,
|
|
@@ -7,6 +15,7 @@ import {
|
|
|
7
15
|
import ViewerContextMenuItem, {
|
|
8
16
|
type ItemProps,
|
|
9
17
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
18
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
10
19
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
11
20
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
12
21
|
import ViewerOptionsSizeSlider from "@ogw_front/components/Viewer/Options/Sliders/Size.vue";
|
|
@@ -26,128 +35,128 @@ interface Props {
|
|
|
26
35
|
|
|
27
36
|
const { itemProps, btnImage, tooltip = "Points options" } = defineProps<Props>();
|
|
28
37
|
|
|
29
|
-
const
|
|
38
|
+
const dataId = toRef(() => itemProps.id);
|
|
30
39
|
|
|
31
|
-
const visibility = computed<
|
|
32
|
-
get: () => dataStyleStore.meshPointsVisibility(
|
|
40
|
+
const visibility = computed<Visibility>({
|
|
41
|
+
get: () => dataStyleStore.meshPointsVisibility(dataId.value),
|
|
33
42
|
set: async (newValue) => {
|
|
34
|
-
await applyBatchStyle(
|
|
35
|
-
dataStyleStore.setMeshPointsVisibility(
|
|
43
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
44
|
+
dataStyleStore.setMeshPointsVisibility(meshId, newValue),
|
|
36
45
|
);
|
|
37
46
|
hybridViewerStore.remoteRender();
|
|
38
47
|
},
|
|
39
48
|
});
|
|
40
|
-
const size = computed<
|
|
41
|
-
get: () => dataStyleStore.meshPointsSize(
|
|
49
|
+
const size = computed<Size>({
|
|
50
|
+
get: () => dataStyleStore.meshPointsSize(dataId.value),
|
|
42
51
|
set: async (newValue) => {
|
|
43
|
-
await applyBatchStyle(
|
|
44
|
-
dataStyleStore.setMeshPointsSize(
|
|
52
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
53
|
+
dataStyleStore.setMeshPointsSize(meshId, newValue),
|
|
45
54
|
);
|
|
46
55
|
hybridViewerStore.remoteRender();
|
|
47
56
|
},
|
|
48
57
|
});
|
|
49
58
|
const coloring_style_key = computed<string>({
|
|
50
|
-
get: () => dataStyleStore.meshPointsActiveColoring(
|
|
59
|
+
get: () => dataStyleStore.meshPointsActiveColoring(dataId.value),
|
|
51
60
|
set: async (newValue) => {
|
|
52
|
-
await applyBatchStyle(
|
|
53
|
-
dataStyleStore.setMeshPointsActiveColoring(
|
|
61
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
62
|
+
dataStyleStore.setMeshPointsActiveColoring(meshId, newValue),
|
|
54
63
|
);
|
|
55
64
|
hybridViewerStore.remoteRender();
|
|
56
65
|
},
|
|
57
66
|
});
|
|
58
67
|
const color = computed<RGBAColor | undefined>({
|
|
59
|
-
get: () => dataStyleStore.meshPointsColor(
|
|
68
|
+
get: () => dataStyleStore.meshPointsColor(dataId.value) as RGBAColor | undefined,
|
|
60
69
|
set: async (newValue) => {
|
|
61
70
|
if (newValue === undefined) {
|
|
62
71
|
return;
|
|
63
72
|
}
|
|
64
|
-
await applyBatchStyle(
|
|
65
|
-
dataStyleStore.setMeshPointsColor(
|
|
73
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
74
|
+
dataStyleStore.setMeshPointsColor(meshId, newValue),
|
|
66
75
|
);
|
|
67
76
|
hybridViewerStore.remoteRender();
|
|
68
77
|
},
|
|
69
78
|
});
|
|
70
|
-
const opacity = computed<
|
|
71
|
-
get: () => dataStyleStore.meshPointsOpacity(
|
|
79
|
+
const opacity = computed<Opacity | undefined>({
|
|
80
|
+
get: () => dataStyleStore.meshPointsOpacity(dataId.value),
|
|
72
81
|
set: async (newValue) => {
|
|
73
82
|
if (newValue === undefined) {
|
|
74
83
|
return;
|
|
75
84
|
}
|
|
76
|
-
await applyBatchStyle(
|
|
77
|
-
dataStyleStore.setMeshPointsOpacity(
|
|
85
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
86
|
+
dataStyleStore.setMeshPointsOpacity(meshId, newValue),
|
|
78
87
|
);
|
|
79
88
|
hybridViewerStore.remoteRender();
|
|
80
89
|
},
|
|
81
90
|
});
|
|
82
|
-
const vertex_attribute_name = computed<
|
|
83
|
-
get: () => dataStyleStore.meshPointsVertexAttributeName(
|
|
91
|
+
const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
92
|
+
get: () => dataStyleStore.meshPointsVertexAttributeName(dataId.value),
|
|
84
93
|
set: async (newValue) => {
|
|
85
94
|
if (newValue === undefined) {
|
|
86
95
|
return;
|
|
87
96
|
}
|
|
88
|
-
await applyBatchStyle(
|
|
89
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(
|
|
97
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
98
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(meshId, newValue)),
|
|
90
99
|
);
|
|
91
100
|
hybridViewerStore.remoteRender();
|
|
92
101
|
},
|
|
93
102
|
});
|
|
94
103
|
|
|
95
|
-
const vertex_attribute_time_step = computed<
|
|
96
|
-
get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(
|
|
104
|
+
const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
105
|
+
get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId.value),
|
|
97
106
|
set: async (newValue) => {
|
|
98
107
|
if (newValue === undefined) {
|
|
99
108
|
return;
|
|
100
109
|
}
|
|
101
|
-
await applyBatchStyle(
|
|
102
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(
|
|
110
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
111
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(meshId, newValue)),
|
|
103
112
|
);
|
|
104
113
|
hybridViewerStore.remoteRender();
|
|
105
114
|
},
|
|
106
115
|
});
|
|
107
|
-
const vertex_attribute_item = computed<
|
|
108
|
-
get: () => dataStyleStore.meshPointsVertexAttributeItem(
|
|
116
|
+
const vertex_attribute_item = computed<AttributeItem>({
|
|
117
|
+
get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId.value),
|
|
109
118
|
set: async (newValue) => {
|
|
110
|
-
await applyBatchStyle(
|
|
111
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(
|
|
119
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
120
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(meshId, newValue)),
|
|
112
121
|
);
|
|
113
122
|
hybridViewerStore.remoteRender();
|
|
114
123
|
},
|
|
115
124
|
});
|
|
116
|
-
const vertex_attribute_range = computed<
|
|
117
|
-
get: () => dataStyleStore.meshPointsVertexAttributeRange(
|
|
125
|
+
const vertex_attribute_range = computed<AttributeRange>({
|
|
126
|
+
get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId.value),
|
|
118
127
|
set: async (newValue) => {
|
|
119
128
|
const [minimum, maximum] = newValue;
|
|
120
129
|
if (minimum === undefined || maximum === undefined) {
|
|
121
130
|
return;
|
|
122
131
|
}
|
|
123
|
-
await applyBatchStyle(
|
|
124
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(
|
|
132
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
133
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum)),
|
|
125
134
|
);
|
|
126
135
|
hybridViewerStore.remoteRender();
|
|
127
136
|
},
|
|
128
137
|
});
|
|
129
|
-
const vertex_attribute_color_map = computed<
|
|
130
|
-
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(
|
|
138
|
+
const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
139
|
+
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId.value),
|
|
131
140
|
set: async (newValue) => {
|
|
132
|
-
await applyBatchStyle(
|
|
133
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(
|
|
141
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
142
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(meshId, newValue)),
|
|
134
143
|
);
|
|
135
144
|
hybridViewerStore.remoteRender();
|
|
136
145
|
},
|
|
137
146
|
});
|
|
138
147
|
const vertex_attribute_no_data_color = computed<RGBAColor>({
|
|
139
|
-
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(
|
|
148
|
+
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId.value),
|
|
140
149
|
set: async (newValue) => {
|
|
141
|
-
await applyBatchStyle(
|
|
142
|
-
dataStyleStore.setMeshPointsVertexAttributeNoDataColor(
|
|
150
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
151
|
+
dataStyleStore.setMeshPointsVertexAttributeNoDataColor(meshId, newValue),
|
|
143
152
|
);
|
|
144
153
|
hybridViewerStore.remoteRender();
|
|
145
154
|
},
|
|
146
155
|
});
|
|
147
156
|
|
|
148
157
|
async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
149
|
-
await applyRangesPerData(ranges, (
|
|
150
|
-
dataStyleStore.setMeshPointsVertexAttributeRange(
|
|
158
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
159
|
+
dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum),
|
|
151
160
|
);
|
|
152
161
|
hybridViewerStore.remoteRender();
|
|
153
162
|
}
|
|
@@ -174,7 +183,7 @@ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<v
|
|
|
174
183
|
<v-divider class="my-2" />
|
|
175
184
|
<ViewerOptionsSizeSlider data-testid="meshPointsSizeSlider" v-model="size" />
|
|
176
185
|
<ViewerOptionsColoringTypeSelector
|
|
177
|
-
:id="
|
|
186
|
+
:data-id="dataId"
|
|
178
187
|
v-model:coloring_style_key="coloring_style_key"
|
|
179
188
|
v-model:color="color"
|
|
180
189
|
v-model:opacity="opacity"
|