@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,32 +1,25 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import GlassCard from "@ogw_front/components/GlassCard.vue";
|
|
3
|
+
import type { ProposedItem } from "@ogw_front/composables/use_overlapping_picker";
|
|
3
4
|
import { formatListId } from "@ogw_front/utils/name_cleaner";
|
|
4
5
|
import { geode_objects } from "@ogw_front/assets/geode_objects";
|
|
5
6
|
|
|
6
|
-
interface IntermediateItem {
|
|
7
|
-
id: string;
|
|
8
|
-
viewer_id: number | undefined;
|
|
9
|
-
name: string;
|
|
10
|
-
viewer_type: string | undefined;
|
|
11
|
-
geode_object_type: string | undefined;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
7
|
interface Props {
|
|
15
8
|
displayIntermediate: boolean;
|
|
16
|
-
intermediateItems:
|
|
9
|
+
intermediateItems: ProposedItem[];
|
|
17
10
|
menuStyle: Record<string, unknown>;
|
|
18
11
|
}
|
|
19
12
|
|
|
20
13
|
const { displayIntermediate, intermediateItems, menuStyle } = defineProps<Props>();
|
|
21
14
|
|
|
22
15
|
interface Emits {
|
|
23
|
-
select: [item:
|
|
16
|
+
select: [item: ProposedItem];
|
|
24
17
|
"update:displayIntermediate": [val: boolean];
|
|
25
18
|
}
|
|
26
19
|
|
|
27
20
|
const emit = defineEmits<Emits>();
|
|
28
21
|
|
|
29
|
-
function selectItem(item:
|
|
22
|
+
function selectItem(item: ProposedItem): void {
|
|
30
23
|
emit("select", item);
|
|
31
24
|
}
|
|
32
25
|
|
|
@@ -64,7 +57,7 @@ function handleUpdate(val: boolean): void {
|
|
|
64
57
|
<v-list class="py-1 bg-transparent" density="compact">
|
|
65
58
|
<v-list-item
|
|
66
59
|
v-for="item in intermediateItems"
|
|
67
|
-
:key="`${item.
|
|
60
|
+
:key="`${item.data_id}-${item.viewer_id}`"
|
|
68
61
|
class="intermediate-picker-item px-3 py-2"
|
|
69
62
|
@click="selectItem(item)"
|
|
70
63
|
>
|
|
@@ -89,7 +82,7 @@ function handleUpdate(val: boolean): void {
|
|
|
89
82
|
>
|
|
90
83
|
<span class="font-weight-medium mr-1">{{ item.geode_object_type }}</span>
|
|
91
84
|
<span style="font-family: monospace; opacity: 0.65; font-size: 0.72rem"
|
|
92
|
-
>· {{ formatListId(item.
|
|
85
|
+
>· {{ formatListId(item.data_id) }}</span
|
|
93
86
|
>
|
|
94
87
|
</v-list-item-subtitle>
|
|
95
88
|
</v-list-item>
|
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
import ViewerContextMenuItem, {
|
|
8
8
|
type ItemProps,
|
|
9
9
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
10
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
11
|
+
import type { Opacity } from "@ogw_front/types/style";
|
|
10
12
|
import PointSetPoints from "@ogw_front/assets/viewer_svgs/point_set_points.svg";
|
|
11
13
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
12
14
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
@@ -25,134 +27,134 @@ interface Props {
|
|
|
25
27
|
|
|
26
28
|
const { itemProps } = defineProps<Props>();
|
|
27
29
|
|
|
28
|
-
const
|
|
30
|
+
const dataId = toRef(() => itemProps.id);
|
|
29
31
|
|
|
30
32
|
const visibility = computed({
|
|
31
|
-
get: () => dataStyleStore.meshPointsVisibility(
|
|
33
|
+
get: () => dataStyleStore.meshPointsVisibility(dataId.value),
|
|
32
34
|
set: async (newValue) => {
|
|
33
35
|
if (newValue === undefined) {
|
|
34
36
|
return;
|
|
35
37
|
}
|
|
36
|
-
await applyBatchStyle(
|
|
37
|
-
dataStyleStore.setMeshPointsVisibility(
|
|
38
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
39
|
+
dataStyleStore.setMeshPointsVisibility(meshId, newValue),
|
|
38
40
|
);
|
|
39
41
|
hybridViewerStore.remoteRender();
|
|
40
42
|
},
|
|
41
43
|
});
|
|
42
44
|
const size = computed({
|
|
43
|
-
get: () => dataStyleStore.meshPointsSize(
|
|
45
|
+
get: () => dataStyleStore.meshPointsSize(dataId.value),
|
|
44
46
|
set: async (newValue) => {
|
|
45
47
|
if (newValue === undefined) {
|
|
46
48
|
return;
|
|
47
49
|
}
|
|
48
|
-
await applyBatchStyle(
|
|
49
|
-
dataStyleStore.setMeshPointsSize(
|
|
50
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
51
|
+
dataStyleStore.setMeshPointsSize(meshId, newValue),
|
|
50
52
|
);
|
|
51
53
|
hybridViewerStore.remoteRender();
|
|
52
54
|
},
|
|
53
55
|
});
|
|
54
56
|
const coloring_style_key = computed({
|
|
55
|
-
get: () => dataStyleStore.meshPointsActiveColoring(
|
|
57
|
+
get: () => dataStyleStore.meshPointsActiveColoring(dataId.value),
|
|
56
58
|
set: async (newValue) => {
|
|
57
|
-
await applyBatchStyle(
|
|
58
|
-
dataStyleStore.setMeshPointsActiveColoring(
|
|
59
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
60
|
+
dataStyleStore.setMeshPointsActiveColoring(meshId, newValue),
|
|
59
61
|
);
|
|
60
62
|
hybridViewerStore.remoteRender();
|
|
61
63
|
},
|
|
62
64
|
});
|
|
63
65
|
const color = computed<RGBAColor | undefined>({
|
|
64
|
-
get: () => dataStyleStore.meshPointsColor(
|
|
66
|
+
get: () => dataStyleStore.meshPointsColor(dataId.value) as RGBAColor | undefined,
|
|
65
67
|
set: async (newValue) => {
|
|
66
68
|
if (newValue === undefined) {
|
|
67
69
|
return;
|
|
68
70
|
}
|
|
69
|
-
await applyBatchStyle(
|
|
70
|
-
dataStyleStore.setMeshPointsColor(
|
|
71
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
72
|
+
dataStyleStore.setMeshPointsColor(meshId, newValue),
|
|
71
73
|
);
|
|
72
74
|
hybridViewerStore.remoteRender();
|
|
73
75
|
},
|
|
74
76
|
});
|
|
75
|
-
const opacity = computed<
|
|
76
|
-
get: () => dataStyleStore.meshPointsOpacity(
|
|
77
|
+
const opacity = computed<Opacity | undefined>({
|
|
78
|
+
get: () => dataStyleStore.meshPointsOpacity(dataId.value),
|
|
77
79
|
set: async (newValue) => {
|
|
78
80
|
if (newValue === undefined) {
|
|
79
81
|
return;
|
|
80
82
|
}
|
|
81
|
-
await applyBatchStyle(
|
|
82
|
-
dataStyleStore.setMeshPointsOpacity(
|
|
83
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
84
|
+
dataStyleStore.setMeshPointsOpacity(meshId, newValue),
|
|
83
85
|
);
|
|
84
86
|
hybridViewerStore.remoteRender();
|
|
85
87
|
},
|
|
86
88
|
});
|
|
87
89
|
const vertex_attribute_name = computed({
|
|
88
|
-
get: () => dataStyleStore.meshPointsVertexAttributeName(
|
|
90
|
+
get: () => dataStyleStore.meshPointsVertexAttributeName(dataId.value),
|
|
89
91
|
set: async (newValue) => {
|
|
90
92
|
if (newValue === undefined) {
|
|
91
93
|
return;
|
|
92
94
|
}
|
|
93
|
-
await applyBatchStyle(
|
|
94
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(
|
|
95
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
96
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeName(meshId, newValue)),
|
|
95
97
|
);
|
|
96
98
|
hybridViewerStore.remoteRender();
|
|
97
99
|
},
|
|
98
100
|
});
|
|
99
101
|
|
|
100
102
|
const vertex_attribute_time_step = computed({
|
|
101
|
-
get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(
|
|
103
|
+
get: () => dataStyleStore.meshPointsVertexAttributeTimeStep(dataId.value),
|
|
102
104
|
set: async (newValue) => {
|
|
103
105
|
if (newValue === undefined) {
|
|
104
106
|
return;
|
|
105
107
|
}
|
|
106
|
-
await applyBatchStyle(
|
|
107
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(
|
|
108
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
109
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeTimeStep(meshId, newValue)),
|
|
108
110
|
);
|
|
109
111
|
hybridViewerStore.remoteRender();
|
|
110
112
|
},
|
|
111
113
|
});
|
|
112
114
|
const vertex_attribute_item = computed({
|
|
113
|
-
get: () => dataStyleStore.meshPointsVertexAttributeItem(
|
|
115
|
+
get: () => dataStyleStore.meshPointsVertexAttributeItem(dataId.value),
|
|
114
116
|
set: async (newValue) => {
|
|
115
|
-
await applyBatchStyle(
|
|
116
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(
|
|
117
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
118
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeItem(meshId, newValue)),
|
|
117
119
|
);
|
|
118
120
|
hybridViewerStore.remoteRender();
|
|
119
121
|
},
|
|
120
122
|
});
|
|
121
123
|
const vertex_attribute_range = computed({
|
|
122
|
-
get: () => dataStyleStore.meshPointsVertexAttributeRange(
|
|
124
|
+
get: () => dataStyleStore.meshPointsVertexAttributeRange(dataId.value),
|
|
123
125
|
set: async (newValue) => {
|
|
124
126
|
const [minimum, maximum] = newValue;
|
|
125
127
|
if (minimum === undefined || maximum === undefined) {
|
|
126
128
|
return;
|
|
127
129
|
}
|
|
128
|
-
await applyBatchStyle(
|
|
129
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(
|
|
130
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
131
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum)),
|
|
130
132
|
);
|
|
131
133
|
hybridViewerStore.remoteRender();
|
|
132
134
|
},
|
|
133
135
|
});
|
|
134
136
|
const vertex_attribute_color_map = computed({
|
|
135
|
-
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(
|
|
137
|
+
get: () => dataStyleStore.meshPointsVertexAttributeColorMap(dataId.value),
|
|
136
138
|
set: async (newValue) => {
|
|
137
|
-
await applyBatchStyle(
|
|
138
|
-
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(
|
|
139
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
140
|
+
Promise.resolve(dataStyleStore.setMeshPointsVertexAttributeColorMap(meshId, newValue)),
|
|
139
141
|
);
|
|
140
142
|
hybridViewerStore.remoteRender();
|
|
141
143
|
},
|
|
142
144
|
});
|
|
143
145
|
const vertex_attribute_no_data_color = computed<RGBAColor>({
|
|
144
|
-
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(
|
|
146
|
+
get: () => dataStyleStore.meshPointsVertexAttributeNoDataColor(dataId.value),
|
|
145
147
|
set: async (newValue) => {
|
|
146
|
-
await applyBatchStyle(
|
|
147
|
-
dataStyleStore.setMeshPointsVertexAttributeNoDataColor(
|
|
148
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
149
|
+
dataStyleStore.setMeshPointsVertexAttributeNoDataColor(meshId, newValue),
|
|
148
150
|
);
|
|
149
151
|
hybridViewerStore.remoteRender();
|
|
150
152
|
},
|
|
151
153
|
});
|
|
152
154
|
|
|
153
155
|
async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
154
|
-
await applyRangesPerData(ranges, (
|
|
155
|
-
dataStyleStore.setMeshPointsVertexAttributeRange(
|
|
156
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
157
|
+
dataStyleStore.setMeshPointsVertexAttributeRange(meshId, minimum, maximum),
|
|
156
158
|
);
|
|
157
159
|
hybridViewerStore.remoteRender();
|
|
158
160
|
}
|
|
@@ -174,7 +176,7 @@ async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<v
|
|
|
174
176
|
<v-divider class="my-2" />
|
|
175
177
|
<ViewerOptionsSizeSlider data-testid="meshPointsSizeSlider" v-model="size" />
|
|
176
178
|
<ViewerOptionsColoringTypeSelector
|
|
177
|
-
:id="
|
|
179
|
+
:data-id="dataId"
|
|
178
180
|
v-model:coloring_style_key="coloring_style_key"
|
|
179
181
|
v-model:color="color"
|
|
180
182
|
v-model:opacity="opacity"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ViewerContextMenuItem, {
|
|
3
|
+
type ItemProps,
|
|
4
|
+
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
+
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
6
|
+
import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
|
|
7
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
itemProps: ItemProps & { index: number };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { itemProps } = defineProps<Props>();
|
|
14
|
+
|
|
15
|
+
const dataStyleStore = useDataStyleStore();
|
|
16
|
+
|
|
17
|
+
const backgroundColor = computed<RGBAColor>({
|
|
18
|
+
get: () => dataStyleStore.sceneStyle.background_color,
|
|
19
|
+
set: async (color) => {
|
|
20
|
+
await dataStyleStore.setSceneBackgroundColor(color);
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<ViewerContextMenuItem
|
|
27
|
+
data-testid="sceneBackgroundMenu"
|
|
28
|
+
:index="itemProps.index"
|
|
29
|
+
:itemProps="itemProps"
|
|
30
|
+
tooltip="Background"
|
|
31
|
+
btnIcon="mdi-image-area"
|
|
32
|
+
>
|
|
33
|
+
<template #options>
|
|
34
|
+
<ViewerOptionsColorPicker v-model="backgroundColor" disabled-alpha />
|
|
35
|
+
</template>
|
|
36
|
+
</ViewerContextMenuItem>
|
|
37
|
+
</template>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ViewerContextMenuItem, {
|
|
3
|
+
type ItemProps,
|
|
4
|
+
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
+
import type { SceneOrientationWidget } from "@ogw_internal/stores/data_style/types";
|
|
6
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
7
|
+
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
itemProps: ItemProps & { index: number };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const { itemProps } = defineProps<Props>();
|
|
14
|
+
|
|
15
|
+
const dataStyleStore = useDataStyleStore();
|
|
16
|
+
const hybridViewerStore = useHybridViewerStore();
|
|
17
|
+
|
|
18
|
+
const orientationWidget = computed<SceneOrientationWidget>({
|
|
19
|
+
get: () => dataStyleStore.sceneStyle.orientation_widget,
|
|
20
|
+
set: async (marker) => {
|
|
21
|
+
await dataStyleStore.setSceneOrientationWidget(marker);
|
|
22
|
+
hybridViewerStore.remoteRender();
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<ViewerContextMenuItem
|
|
29
|
+
data-testid="sceneOrientationWidgetMenu"
|
|
30
|
+
:index="itemProps.index"
|
|
31
|
+
:itemProps="itemProps"
|
|
32
|
+
tooltip="Orientation widget"
|
|
33
|
+
btnIcon="mdi-compass-outline"
|
|
34
|
+
>
|
|
35
|
+
<template #options>
|
|
36
|
+
<v-btn-toggle
|
|
37
|
+
v-model="orientationWidget"
|
|
38
|
+
data-testid="sceneOrientationWidgetToggle"
|
|
39
|
+
mandatory
|
|
40
|
+
density="compact"
|
|
41
|
+
divided
|
|
42
|
+
>
|
|
43
|
+
<v-btn value="axes" data-testid="sceneOrientationWidgetAxes">Axes</v-btn>
|
|
44
|
+
<v-btn value="compass" data-testid="sceneOrientationWidgetCompass">Compass</v-btn>
|
|
45
|
+
</v-btn-toggle>
|
|
46
|
+
</template>
|
|
47
|
+
</ViewerContextMenuItem>
|
|
48
|
+
</template>
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import ViewerContextMenuItem, {
|
|
3
|
+
type ItemProps,
|
|
4
|
+
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
+
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
6
|
+
import type { SceneFontFamily } from "@ogw_internal/stores/data_style/types";
|
|
7
|
+
import ViewerOptionsColorPicker from "@ogw_front/components/Viewer/Options/ColorPicker.vue";
|
|
8
|
+
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
9
|
+
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
itemProps: ItemProps & { index: number };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { itemProps } = defineProps<Props>();
|
|
16
|
+
|
|
17
|
+
const dataStyleStore = useDataStyleStore();
|
|
18
|
+
const hybridViewerStore = useHybridViewerStore();
|
|
19
|
+
|
|
20
|
+
const FONT_FAMILIES: { title: string; value: SceneFontFamily }[] = [
|
|
21
|
+
{ title: "Arial", value: "arial" },
|
|
22
|
+
{ title: "Courier", value: "courier" },
|
|
23
|
+
{ title: "Times", value: "times" },
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
const textColor = computed<RGBAColor>({
|
|
27
|
+
get: () => dataStyleStore.sceneStyle.text.color,
|
|
28
|
+
set: async (color) => {
|
|
29
|
+
await dataStyleStore.setSceneTextColor(color);
|
|
30
|
+
hybridViewerStore.remoteRender();
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const fontFamily = computed<SceneFontFamily>({
|
|
35
|
+
get: () => dataStyleStore.sceneStyle.text.font_family,
|
|
36
|
+
set: async (font_family) => {
|
|
37
|
+
await dataStyleStore.setSceneFontFamily(font_family);
|
|
38
|
+
hybridViewerStore.remoteRender();
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
<template>
|
|
44
|
+
<ViewerContextMenuItem
|
|
45
|
+
data-testid="sceneTextMenu"
|
|
46
|
+
:index="itemProps.index"
|
|
47
|
+
:itemProps="itemProps"
|
|
48
|
+
tooltip="Text"
|
|
49
|
+
btnIcon="mdi-format-text"
|
|
50
|
+
>
|
|
51
|
+
<template #options>
|
|
52
|
+
<v-select
|
|
53
|
+
v-model="fontFamily"
|
|
54
|
+
data-testid="sceneFontFamilySelect"
|
|
55
|
+
:items="FONT_FAMILIES"
|
|
56
|
+
label="Font"
|
|
57
|
+
density="compact"
|
|
58
|
+
hide-details
|
|
59
|
+
/>
|
|
60
|
+
<ViewerOptionsColorPicker v-model="textColor" class="mt-2" />
|
|
61
|
+
</template>
|
|
62
|
+
</ViewerContextMenuItem>
|
|
63
|
+
</template>
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
AttributeItem,
|
|
4
|
+
AttributeName,
|
|
5
|
+
AttributeRange,
|
|
6
|
+
AttributeTimeStep,
|
|
7
|
+
} from "@ogw_front/types/attribute";
|
|
8
|
+
import type { DataId, MeshId } from "@ogw_front/types/identifiers";
|
|
2
9
|
import {
|
|
3
10
|
type RangesPerData,
|
|
4
11
|
applyRangesPerData,
|
|
5
12
|
useBatchStyle,
|
|
6
13
|
} from "@ogw_front/composables/batch_style";
|
|
14
|
+
import type { Opacity } from "@ogw_front/types/style";
|
|
7
15
|
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
8
16
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
9
17
|
import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
|
|
@@ -15,179 +23,175 @@ const hybridViewerStore = useHybridViewerStore();
|
|
|
15
23
|
const { applyBatchStyle } = useBatchStyle();
|
|
16
24
|
|
|
17
25
|
interface Props {
|
|
18
|
-
|
|
26
|
+
dataId: DataId;
|
|
19
27
|
}
|
|
20
28
|
|
|
21
|
-
const {
|
|
29
|
+
const { dataId } = defineProps<Props>();
|
|
22
30
|
|
|
23
31
|
const coloring_style_key = computed<string>({
|
|
24
|
-
get: () => dataStyleStore.meshPolyhedraActiveColoring(
|
|
32
|
+
get: () => dataStyleStore.meshPolyhedraActiveColoring(dataId),
|
|
25
33
|
set: async (newValue) => {
|
|
26
|
-
await applyBatchStyle(
|
|
27
|
-
dataStyleStore.setMeshPolyhedraActiveColoring(
|
|
34
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
35
|
+
dataStyleStore.setMeshPolyhedraActiveColoring(meshId, newValue),
|
|
28
36
|
);
|
|
29
37
|
hybridViewerStore.remoteRender();
|
|
30
38
|
},
|
|
31
39
|
});
|
|
32
40
|
const color = useBatchStyleModel<RGBAColor>(
|
|
33
|
-
() =>
|
|
34
|
-
(
|
|
35
|
-
(
|
|
41
|
+
() => dataId,
|
|
42
|
+
(meshId) => dataStyleStore.meshPolyhedraColor(meshId) as RGBAColor | undefined,
|
|
43
|
+
(meshId, value) => dataStyleStore.setMeshPolyhedraColor(meshId, value),
|
|
36
44
|
);
|
|
37
|
-
const opacity = useBatchStyleModel<
|
|
38
|
-
() =>
|
|
39
|
-
(
|
|
40
|
-
(
|
|
45
|
+
const opacity = useBatchStyleModel<Opacity>(
|
|
46
|
+
() => dataId,
|
|
47
|
+
(meshId) => dataStyleStore.meshPolyhedraOpacity(meshId),
|
|
48
|
+
(meshId, value) => dataStyleStore.setMeshPolyhedraOpacity(meshId, value),
|
|
41
49
|
);
|
|
42
|
-
const vertex_attribute_name = computed<
|
|
43
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeName(
|
|
50
|
+
const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
51
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeName(dataId),
|
|
44
52
|
set: async (newValue) => {
|
|
45
53
|
if (newValue === undefined) {
|
|
46
54
|
return;
|
|
47
55
|
}
|
|
48
|
-
await applyBatchStyle(
|
|
49
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeName(
|
|
56
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
57
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeName(meshId, newValue)),
|
|
50
58
|
);
|
|
51
59
|
hybridViewerStore.remoteRender();
|
|
52
60
|
},
|
|
53
61
|
});
|
|
54
62
|
|
|
55
|
-
const vertex_attribute_time_step = computed<
|
|
56
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeTimeStep(
|
|
63
|
+
const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
64
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeTimeStep(dataId),
|
|
57
65
|
set: async (newValue) => {
|
|
58
66
|
if (newValue === undefined) {
|
|
59
67
|
return;
|
|
60
68
|
}
|
|
61
|
-
await applyBatchStyle(
|
|
62
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeTimeStep(
|
|
69
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
70
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeTimeStep(meshId, newValue)),
|
|
63
71
|
);
|
|
64
72
|
hybridViewerStore.remoteRender();
|
|
65
73
|
},
|
|
66
74
|
});
|
|
67
|
-
const vertex_attribute_item = computed<
|
|
68
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeItem(
|
|
75
|
+
const vertex_attribute_item = computed<AttributeItem>({
|
|
76
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeItem(dataId),
|
|
69
77
|
set: async (newValue) => {
|
|
70
|
-
await applyBatchStyle(
|
|
71
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeItem(
|
|
78
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
79
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeItem(meshId, newValue)),
|
|
72
80
|
);
|
|
73
81
|
hybridViewerStore.remoteRender();
|
|
74
82
|
},
|
|
75
83
|
});
|
|
76
|
-
const vertex_attribute_range = computed<
|
|
77
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(
|
|
84
|
+
const vertex_attribute_range = computed<AttributeRange>({
|
|
85
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeRange(dataId),
|
|
78
86
|
set: async (newValue) => {
|
|
79
87
|
const [minimum, maximum] = newValue;
|
|
80
88
|
if (minimum === undefined || maximum === undefined) {
|
|
81
89
|
return;
|
|
82
90
|
}
|
|
83
|
-
await applyBatchStyle(
|
|
91
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
84
92
|
Promise.resolve(
|
|
85
|
-
dataStyleStore.setMeshPolyhedraVertexAttributeRange(
|
|
93
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeRange(meshId, minimum, maximum),
|
|
86
94
|
),
|
|
87
95
|
);
|
|
88
96
|
hybridViewerStore.remoteRender();
|
|
89
97
|
},
|
|
90
98
|
});
|
|
91
99
|
const vertex_attribute_color_map = computed<Map<string, RGBAColor> | undefined>({
|
|
92
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(
|
|
100
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeColorMap(dataId),
|
|
93
101
|
set: async (newValue) => {
|
|
94
|
-
await applyBatchStyle(
|
|
95
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeColorMap(
|
|
102
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
103
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraVertexAttributeColorMap(meshId, newValue)),
|
|
96
104
|
);
|
|
97
105
|
hybridViewerStore.remoteRender();
|
|
98
106
|
},
|
|
99
107
|
});
|
|
100
108
|
const vertex_attribute_no_data_color = computed<RGBAColor>({
|
|
101
|
-
get: () => dataStyleStore.meshPolyhedraVertexAttributeNoDataColor(
|
|
109
|
+
get: () => dataStyleStore.meshPolyhedraVertexAttributeNoDataColor(dataId),
|
|
102
110
|
set: async (newValue) => {
|
|
103
|
-
await applyBatchStyle(
|
|
104
|
-
dataStyleStore.setMeshPolyhedraVertexAttributeNoDataColor(
|
|
111
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
112
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeNoDataColor(meshId, newValue),
|
|
105
113
|
);
|
|
106
114
|
hybridViewerStore.remoteRender();
|
|
107
115
|
},
|
|
108
116
|
});
|
|
109
|
-
const polyhedron_attribute_name = computed<
|
|
110
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeName(
|
|
117
|
+
const polyhedron_attribute_name = computed<AttributeName | undefined>({
|
|
118
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeName(dataId),
|
|
111
119
|
set: async (newValue) => {
|
|
112
120
|
if (newValue === undefined) {
|
|
113
121
|
return;
|
|
114
122
|
}
|
|
115
|
-
await applyBatchStyle(
|
|
116
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeName(
|
|
123
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
124
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeName(meshId, newValue)),
|
|
117
125
|
);
|
|
118
126
|
hybridViewerStore.remoteRender();
|
|
119
127
|
},
|
|
120
128
|
});
|
|
121
129
|
|
|
122
|
-
const polyhedron_attribute_time_step = computed<
|
|
123
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeTimeStep(
|
|
130
|
+
const polyhedron_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
131
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeTimeStep(dataId),
|
|
124
132
|
set: async (newValue) => {
|
|
125
133
|
if (newValue === undefined) {
|
|
126
134
|
return;
|
|
127
135
|
}
|
|
128
|
-
await applyBatchStyle(
|
|
129
|
-
Promise.resolve(
|
|
130
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeTimeStep(targetId, newValue),
|
|
131
|
-
),
|
|
136
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
137
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeTimeStep(meshId, newValue)),
|
|
132
138
|
);
|
|
133
139
|
hybridViewerStore.remoteRender();
|
|
134
140
|
},
|
|
135
141
|
});
|
|
136
|
-
const polyhedron_attribute_item = computed<
|
|
137
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeItem(
|
|
142
|
+
const polyhedron_attribute_item = computed<AttributeItem>({
|
|
143
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeItem(dataId),
|
|
138
144
|
set: async (newValue) => {
|
|
139
|
-
await applyBatchStyle(
|
|
140
|
-
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeItem(
|
|
145
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
146
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeItem(meshId, newValue)),
|
|
141
147
|
);
|
|
142
148
|
hybridViewerStore.remoteRender();
|
|
143
149
|
},
|
|
144
150
|
});
|
|
145
|
-
const polyhedron_attribute_range = computed<
|
|
146
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeRange(
|
|
151
|
+
const polyhedron_attribute_range = computed<AttributeRange>({
|
|
152
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeRange(dataId),
|
|
147
153
|
set: async (newValue) => {
|
|
148
154
|
const [minimum, maximum] = newValue;
|
|
149
155
|
if (minimum === undefined || maximum === undefined) {
|
|
150
156
|
return;
|
|
151
157
|
}
|
|
152
|
-
await applyBatchStyle(
|
|
158
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
153
159
|
Promise.resolve(
|
|
154
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(
|
|
160
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(meshId, minimum, maximum),
|
|
155
161
|
),
|
|
156
162
|
);
|
|
157
163
|
hybridViewerStore.remoteRender();
|
|
158
164
|
},
|
|
159
165
|
});
|
|
160
166
|
const polyhedron_attribute_color_map = computed<Map<string, RGBAColor> | undefined>({
|
|
161
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(
|
|
167
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeColorMap(dataId),
|
|
162
168
|
set: async (newValue) => {
|
|
163
|
-
await applyBatchStyle(
|
|
164
|
-
Promise.resolve(
|
|
165
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeColorMap(targetId, newValue),
|
|
166
|
-
),
|
|
169
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
170
|
+
Promise.resolve(dataStyleStore.setMeshPolyhedraPolyhedronAttributeColorMap(meshId, newValue)),
|
|
167
171
|
);
|
|
168
172
|
hybridViewerStore.remoteRender();
|
|
169
173
|
},
|
|
170
174
|
});
|
|
171
175
|
const polyhedron_attribute_no_data_color = computed<RGBAColor>({
|
|
172
|
-
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeNoDataColor(
|
|
176
|
+
get: () => dataStyleStore.meshPolyhedraPolyhedronAttributeNoDataColor(dataId),
|
|
173
177
|
set: async (newValue) => {
|
|
174
|
-
await applyBatchStyle(
|
|
175
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeNoDataColor(
|
|
178
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
179
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeNoDataColor(meshId, newValue),
|
|
176
180
|
);
|
|
177
181
|
hybridViewerStore.remoteRender();
|
|
178
182
|
},
|
|
179
183
|
});
|
|
180
184
|
|
|
181
185
|
async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
182
|
-
await applyRangesPerData(ranges, (
|
|
183
|
-
dataStyleStore.setMeshPolyhedraVertexAttributeRange(
|
|
186
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
187
|
+
dataStyleStore.setMeshPolyhedraVertexAttributeRange(meshId, minimum, maximum),
|
|
184
188
|
);
|
|
185
189
|
hybridViewerStore.remoteRender();
|
|
186
190
|
}
|
|
187
191
|
|
|
188
192
|
async function setPolyhedronAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
189
|
-
await applyRangesPerData(ranges, (
|
|
190
|
-
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(
|
|
193
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
194
|
+
dataStyleStore.setMeshPolyhedraPolyhedronAttributeRange(meshId, minimum, maximum),
|
|
191
195
|
);
|
|
192
196
|
hybridViewerStore.remoteRender();
|
|
193
197
|
}
|
|
@@ -195,7 +199,7 @@ async function setPolyhedronAttributeRangesPerData(ranges: RangesPerData): Promi
|
|
|
195
199
|
|
|
196
200
|
<template>
|
|
197
201
|
<ViewerOptionsColoringTypeSelector
|
|
198
|
-
:id="
|
|
202
|
+
:data-id="dataId"
|
|
199
203
|
v-model:coloring_style_key="coloring_style_key"
|
|
200
204
|
v-model:color="color"
|
|
201
205
|
v-model:opacity="opacity"
|