@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
|
@@ -60,7 +60,7 @@ watch(
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
const modelId = asString(newMeta.modelId) ?? asString(newMeta.
|
|
63
|
+
const modelId = asString(newMeta.modelId) ?? asString(newMeta.data_id);
|
|
64
64
|
if (newMeta.pickedComponentId && modelId) {
|
|
65
65
|
const components = await dataStore.getAllMeshComponents(modelId);
|
|
66
66
|
const comp = components.find(
|
|
@@ -128,13 +128,15 @@ function formatId(id: string | undefined): string {
|
|
|
128
128
|
return `${id.slice(0, ID_SLICE_START)}...${id.slice(id.length - ID_SLICE_END_OFFSET)}`;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
const formattedId = computed<string>(() => formatId(metaData.
|
|
131
|
+
const formattedId = computed<string>(() => formatId(metaData.data_id));
|
|
132
132
|
|
|
133
133
|
const crsStore = useCrsStore();
|
|
134
134
|
// A model component shares the model CRS: the CRS row is only shown for a data
|
|
135
|
-
const isData = computed<boolean>(
|
|
135
|
+
const isData = computed<boolean>(
|
|
136
|
+
() => metaData.data_id !== undefined && metaData.modelId === undefined,
|
|
137
|
+
);
|
|
136
138
|
// The menu metadata is a snapshot taken when it opened: read the item live so a CRS edit shows at once
|
|
137
|
-
const liveItem = useLiveDataItem(() => (isData.value ? metaData.
|
|
139
|
+
const liveItem = useLiveDataItem(() => (isData.value ? metaData.data_id : undefined));
|
|
138
140
|
const liveCrs = computed(() => liveItem.value?.crs ?? metaData.crs);
|
|
139
141
|
</script>
|
|
140
142
|
|
|
@@ -164,17 +166,17 @@ const liveCrs = computed(() => liveItem.value?.crs ?? metaData.crs);
|
|
|
164
166
|
{{ metaData.geode_object_type }}
|
|
165
167
|
</v-col>
|
|
166
168
|
<v-col
|
|
167
|
-
v-if="metaData.
|
|
169
|
+
v-if="metaData.data_id"
|
|
168
170
|
class="id-badge-container mt-1 d-inline-flex align-center px-2 py-0.5"
|
|
169
|
-
@click.stop="copyId(metaData.
|
|
171
|
+
@click.stop="copyId(metaData.data_id)"
|
|
170
172
|
>
|
|
171
173
|
<span class="id-text">
|
|
172
|
-
{{ isCopied(metaData.
|
|
174
|
+
{{ isCopied(metaData.data_id) ? "COPIED!" : formattedId }}
|
|
173
175
|
</span>
|
|
174
176
|
<v-icon
|
|
175
|
-
:icon="isCopied(metaData.
|
|
177
|
+
:icon="isCopied(metaData.data_id) ? 'mdi-check' : 'mdi-content-copy'"
|
|
176
178
|
size="10"
|
|
177
|
-
:color="isCopied(metaData.
|
|
179
|
+
:color="isCopied(metaData.data_id) ? 'success' : 'white'"
|
|
178
180
|
class="ml-1"
|
|
179
181
|
/>
|
|
180
182
|
</v-col>
|
|
@@ -195,7 +197,7 @@ const liveCrs = computed(() => liveItem.value?.crs ?? metaData.crs);
|
|
|
195
197
|
size="x-small"
|
|
196
198
|
color="white"
|
|
197
199
|
class="ml-1"
|
|
198
|
-
@click.stop="crsStore.requestCrsEdit(metaData.
|
|
200
|
+
@click.stop="crsStore.requestCrsEdit(metaData.data_id)"
|
|
199
201
|
/>
|
|
200
202
|
</v-col>
|
|
201
203
|
|
|
@@ -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,171 +24,171 @@ 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.meshEdgesActiveColoring(
|
|
33
|
+
get: () => dataStyleStore.meshEdgesActiveColoring(dataId),
|
|
25
34
|
set: async (newValue) => {
|
|
26
|
-
await applyBatchStyle(
|
|
27
|
-
dataStyleStore.setMeshEdgesActiveColoring(
|
|
35
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
36
|
+
dataStyleStore.setMeshEdgesActiveColoring(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.meshEdgesColor(meshId) as RGBAColor | undefined,
|
|
44
|
+
(meshId, value) => dataStyleStore.setMeshEdgesColor(meshId, value),
|
|
36
45
|
);
|
|
37
|
-
const opacity = useBatchStyleModel<
|
|
38
|
-
() =>
|
|
39
|
-
(
|
|
40
|
-
(
|
|
46
|
+
const opacity = useBatchStyleModel<Opacity>(
|
|
47
|
+
() => dataId,
|
|
48
|
+
(meshId) => dataStyleStore.meshEdgesOpacity(meshId),
|
|
49
|
+
(meshId, value) => dataStyleStore.setMeshEdgesOpacity(meshId, value),
|
|
41
50
|
);
|
|
42
|
-
const vertex_attribute_name = computed<
|
|
43
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeName(
|
|
51
|
+
const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
52
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeName(dataId),
|
|
44
53
|
set: async (newValue) => {
|
|
45
54
|
if (newValue === undefined) {
|
|
46
55
|
return;
|
|
47
56
|
}
|
|
48
|
-
await applyBatchStyle(
|
|
49
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeName(
|
|
57
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
58
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeName(meshId, newValue)),
|
|
50
59
|
);
|
|
51
60
|
hybridViewerStore.remoteRender();
|
|
52
61
|
},
|
|
53
62
|
});
|
|
54
63
|
|
|
55
|
-
const vertex_attribute_time_step = computed<
|
|
56
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeTimeStep(
|
|
64
|
+
const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
65
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeTimeStep(dataId),
|
|
57
66
|
set: async (newValue) => {
|
|
58
67
|
if (newValue === undefined) {
|
|
59
68
|
return;
|
|
60
69
|
}
|
|
61
|
-
await applyBatchStyle(
|
|
62
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeTimeStep(
|
|
70
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
71
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeTimeStep(meshId, newValue)),
|
|
63
72
|
);
|
|
64
73
|
hybridViewerStore.remoteRender();
|
|
65
74
|
},
|
|
66
75
|
});
|
|
67
|
-
const vertex_attribute_item = computed<
|
|
68
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeItem(
|
|
76
|
+
const vertex_attribute_item = computed<AttributeItem>({
|
|
77
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeItem(dataId),
|
|
69
78
|
set: async (newValue) => {
|
|
70
|
-
await applyBatchStyle(
|
|
71
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeItem(
|
|
79
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
80
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeItem(meshId, newValue)),
|
|
72
81
|
);
|
|
73
82
|
hybridViewerStore.remoteRender();
|
|
74
83
|
},
|
|
75
84
|
});
|
|
76
|
-
const vertex_attribute_range = computed<
|
|
77
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeRange(
|
|
85
|
+
const vertex_attribute_range = computed<AttributeRange>({
|
|
86
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeRange(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(
|
|
84
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeRange(
|
|
92
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
93
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeRange(meshId, minimum, maximum)),
|
|
85
94
|
);
|
|
86
95
|
hybridViewerStore.remoteRender();
|
|
87
96
|
},
|
|
88
97
|
});
|
|
89
|
-
const vertex_attribute_color_map = computed<
|
|
90
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(
|
|
98
|
+
const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
99
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeColorMap(dataId),
|
|
91
100
|
set: async (newValue) => {
|
|
92
|
-
await applyBatchStyle(
|
|
93
|
-
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeColorMap(
|
|
101
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
102
|
+
Promise.resolve(dataStyleStore.setMeshEdgesVertexAttributeColorMap(meshId, newValue)),
|
|
94
103
|
);
|
|
95
104
|
hybridViewerStore.remoteRender();
|
|
96
105
|
},
|
|
97
106
|
});
|
|
98
107
|
const vertex_attribute_no_data_color = computed<RGBAColor>({
|
|
99
|
-
get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(
|
|
108
|
+
get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(dataId),
|
|
100
109
|
set: async (newValue) => {
|
|
101
|
-
await applyBatchStyle(
|
|
102
|
-
dataStyleStore.setMeshEdgesVertexAttributeNoDataColor(
|
|
110
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
111
|
+
dataStyleStore.setMeshEdgesVertexAttributeNoDataColor(meshId, newValue),
|
|
103
112
|
);
|
|
104
113
|
hybridViewerStore.remoteRender();
|
|
105
114
|
},
|
|
106
115
|
});
|
|
107
|
-
const edge_attribute_name = computed<
|
|
108
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeName(
|
|
116
|
+
const edge_attribute_name = computed<AttributeName | undefined>({
|
|
117
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeName(dataId),
|
|
109
118
|
set: async (newValue) => {
|
|
110
119
|
if (newValue === undefined) {
|
|
111
120
|
return;
|
|
112
121
|
}
|
|
113
|
-
await applyBatchStyle(
|
|
114
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeName(
|
|
122
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
123
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeName(meshId, newValue)),
|
|
115
124
|
);
|
|
116
125
|
hybridViewerStore.remoteRender();
|
|
117
126
|
},
|
|
118
127
|
});
|
|
119
128
|
|
|
120
|
-
const edge_attribute_time_step = computed<
|
|
121
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeTimeStep(
|
|
129
|
+
const edge_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
130
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeTimeStep(dataId),
|
|
122
131
|
set: async (newValue) => {
|
|
123
132
|
if (newValue === undefined) {
|
|
124
133
|
return;
|
|
125
134
|
}
|
|
126
|
-
await applyBatchStyle(
|
|
127
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeTimeStep(
|
|
135
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
136
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeTimeStep(meshId, newValue)),
|
|
128
137
|
);
|
|
129
138
|
hybridViewerStore.remoteRender();
|
|
130
139
|
},
|
|
131
140
|
});
|
|
132
|
-
const edge_attribute_item = computed<
|
|
133
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeItem(
|
|
141
|
+
const edge_attribute_item = computed<AttributeItem>({
|
|
142
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeItem(dataId),
|
|
134
143
|
set: async (newValue) => {
|
|
135
|
-
await applyBatchStyle(
|
|
136
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeItem(
|
|
144
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
145
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeItem(meshId, newValue)),
|
|
137
146
|
);
|
|
138
147
|
hybridViewerStore.remoteRender();
|
|
139
148
|
},
|
|
140
149
|
});
|
|
141
|
-
const edge_attribute_range = computed<
|
|
142
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeRange(
|
|
150
|
+
const edge_attribute_range = computed<AttributeRange>({
|
|
151
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeRange(dataId),
|
|
143
152
|
set: async (newValue) => {
|
|
144
153
|
const [minimum, maximum] = newValue;
|
|
145
154
|
if (minimum === undefined || maximum === undefined) {
|
|
146
155
|
return;
|
|
147
156
|
}
|
|
148
|
-
await applyBatchStyle(
|
|
149
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeRange(
|
|
157
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
158
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeRange(meshId, minimum, maximum)),
|
|
150
159
|
);
|
|
151
160
|
hybridViewerStore.remoteRender();
|
|
152
161
|
},
|
|
153
162
|
});
|
|
154
|
-
const edge_attribute_color_map = computed<
|
|
155
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(
|
|
163
|
+
const edge_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
164
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeColorMap(dataId),
|
|
156
165
|
set: async (newValue) => {
|
|
157
|
-
await applyBatchStyle(
|
|
158
|
-
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeColorMap(
|
|
166
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
167
|
+
Promise.resolve(dataStyleStore.setMeshEdgesEdgeAttributeColorMap(meshId, newValue)),
|
|
159
168
|
);
|
|
160
169
|
hybridViewerStore.remoteRender();
|
|
161
170
|
},
|
|
162
171
|
});
|
|
163
172
|
const edge_attribute_no_data_color = computed<RGBAColor>({
|
|
164
|
-
get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(
|
|
173
|
+
get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(dataId),
|
|
165
174
|
set: async (newValue) => {
|
|
166
|
-
await applyBatchStyle(
|
|
167
|
-
dataStyleStore.setMeshEdgesEdgeAttributeNoDataColor(
|
|
175
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
176
|
+
dataStyleStore.setMeshEdgesEdgeAttributeNoDataColor(meshId, newValue),
|
|
168
177
|
);
|
|
169
178
|
hybridViewerStore.remoteRender();
|
|
170
179
|
},
|
|
171
180
|
});
|
|
172
181
|
|
|
173
182
|
async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
174
|
-
await applyRangesPerData(ranges, (
|
|
175
|
-
dataStyleStore.setMeshEdgesVertexAttributeRange(
|
|
183
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
184
|
+
dataStyleStore.setMeshEdgesVertexAttributeRange(meshId, minimum, maximum),
|
|
176
185
|
);
|
|
177
186
|
hybridViewerStore.remoteRender();
|
|
178
187
|
}
|
|
179
188
|
|
|
180
189
|
async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
181
|
-
await applyRangesPerData(ranges, (
|
|
182
|
-
dataStyleStore.setMeshEdgesEdgeAttributeRange(
|
|
190
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
191
|
+
dataStyleStore.setMeshEdgesEdgeAttributeRange(meshId, minimum, maximum),
|
|
183
192
|
);
|
|
184
193
|
hybridViewerStore.remoteRender();
|
|
185
194
|
}
|
|
@@ -187,7 +196,7 @@ async function setEdgeAttributeRangesPerData(ranges: RangesPerData): Promise<voi
|
|
|
187
196
|
|
|
188
197
|
<template>
|
|
189
198
|
<ViewerOptionsColoringTypeSelector
|
|
190
|
-
:id="
|
|
199
|
+
:data-id="dataId"
|
|
191
200
|
v-model:coloring_style_key="coloring_style_key"
|
|
192
201
|
v-model:color="color"
|
|
193
202
|
v-model:opacity="opacity"
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import ViewerContextMenuItem, {
|
|
3
3
|
type ItemProps,
|
|
4
4
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
+
import type { Visibility, Width } from "@ogw_front/types/style";
|
|
5
6
|
import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg";
|
|
7
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
6
8
|
import ViewerEdgedCurveSpecificEdgesColoring from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue";
|
|
7
9
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
10
|
import ViewerOptionsWidthSlider from "@ogw_front/components/Viewer/Options/Sliders/Width.vue";
|
|
@@ -20,22 +22,22 @@ interface Props {
|
|
|
20
22
|
|
|
21
23
|
const { itemProps } = defineProps<Props>();
|
|
22
24
|
|
|
23
|
-
const
|
|
25
|
+
const dataId = toRef(() => itemProps.id);
|
|
24
26
|
|
|
25
|
-
const visibility = computed<
|
|
26
|
-
get: () => dataStyleStore.meshEdgesVisibility(
|
|
27
|
+
const visibility = computed<Visibility>({
|
|
28
|
+
get: () => dataStyleStore.meshEdgesVisibility(dataId.value),
|
|
27
29
|
set: async (newValue) => {
|
|
28
|
-
await applyBatchStyle(
|
|
29
|
-
dataStyleStore.setMeshEdgesVisibility(
|
|
30
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
31
|
+
dataStyleStore.setMeshEdgesVisibility(meshId, newValue),
|
|
30
32
|
);
|
|
31
33
|
hybridViewerStore.remoteRender();
|
|
32
34
|
},
|
|
33
35
|
});
|
|
34
|
-
const width = computed<
|
|
35
|
-
get: () => dataStyleStore.meshEdgesWidth(
|
|
36
|
+
const width = computed<Width>({
|
|
37
|
+
get: () => dataStyleStore.meshEdgesWidth(dataId.value),
|
|
36
38
|
set: async (newValue) => {
|
|
37
|
-
await applyBatchStyle(
|
|
38
|
-
dataStyleStore.setMeshEdgesWidth(
|
|
39
|
+
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
40
|
+
dataStyleStore.setMeshEdgesWidth(meshId, newValue),
|
|
39
41
|
);
|
|
40
42
|
hybridViewerStore.remoteRender();
|
|
41
43
|
},
|
|
@@ -55,7 +57,7 @@ const width = computed<number>({
|
|
|
55
57
|
<template v-if="visibility">
|
|
56
58
|
<v-divider class="my-2" />
|
|
57
59
|
<ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="width" />
|
|
58
|
-
<ViewerEdgedCurveSpecificEdgesColoring :id="
|
|
60
|
+
<ViewerEdgedCurveSpecificEdgesColoring :data-id="dataId" />
|
|
59
61
|
</template>
|
|
60
62
|
</template>
|
|
61
63
|
</ViewerContextMenuItem>
|
|
@@ -1,196 +1,201 @@
|
|
|
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
|
}
|
|
25
30
|
|
|
26
|
-
const {
|
|
31
|
+
const { dataId } = defineProps<Props>();
|
|
27
32
|
|
|
28
33
|
const coloring_style_key = computed<string>({
|
|
29
|
-
get: () => dataStyleStore.meshCellsActiveColoring(
|
|
34
|
+
get: () => dataStyleStore.meshCellsActiveColoring(dataId),
|
|
30
35
|
set: async (newValue) => {
|
|
31
|
-
await applyBatchStyle(
|
|
32
|
-
dataStyleStore.setMeshCellsActiveColoring(
|
|
36
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
37
|
+
dataStyleStore.setMeshCellsActiveColoring(meshId, newValue),
|
|
33
38
|
);
|
|
34
39
|
hybridViewerStore.remoteRender();
|
|
35
40
|
},
|
|
36
41
|
});
|
|
37
42
|
const color = useBatchStyleModel<RGBAColor>(
|
|
38
|
-
() =>
|
|
39
|
-
(
|
|
40
|
-
(
|
|
43
|
+
() => dataId,
|
|
44
|
+
(meshId) => dataStyleStore.meshCellsColor(meshId) as RGBAColor | undefined,
|
|
45
|
+
(meshId, value) => dataStyleStore.setMeshCellsColor(meshId, value),
|
|
41
46
|
);
|
|
42
|
-
const opacity = useBatchStyleModel<
|
|
43
|
-
() =>
|
|
44
|
-
(
|
|
45
|
-
(
|
|
47
|
+
const opacity = useBatchStyleModel<Opacity>(
|
|
48
|
+
() => dataId,
|
|
49
|
+
(meshId) => dataStyleStore.meshCellsOpacity(meshId),
|
|
50
|
+
(meshId, value) => dataStyleStore.setMeshCellsOpacity(meshId, value),
|
|
46
51
|
);
|
|
47
52
|
const textures = useBatchStyleModel<Texture[]>(
|
|
48
|
-
() =>
|
|
49
|
-
(
|
|
50
|
-
(
|
|
53
|
+
() => dataId,
|
|
54
|
+
(meshId) => dataStyleStore.meshCellsTextures(meshId) as Texture[] | undefined,
|
|
55
|
+
(meshId, value) => dataStyleStore.setMeshCellsTextures(meshId, value),
|
|
51
56
|
);
|
|
52
57
|
|
|
53
|
-
const vertex_attribute_name = computed<
|
|
54
|
-
get: () => dataStyleStore.meshCellsVertexAttributeName(
|
|
58
|
+
const vertex_attribute_name = computed<AttributeName | undefined>({
|
|
59
|
+
get: () => dataStyleStore.meshCellsVertexAttributeName(dataId),
|
|
55
60
|
set: async (newValue) => {
|
|
56
61
|
if (newValue === undefined) {
|
|
57
62
|
return;
|
|
58
63
|
}
|
|
59
|
-
await applyBatchStyle(
|
|
60
|
-
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeName(
|
|
64
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
65
|
+
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeName(meshId, newValue)),
|
|
61
66
|
);
|
|
62
67
|
hybridViewerStore.remoteRender();
|
|
63
68
|
},
|
|
64
69
|
});
|
|
65
70
|
|
|
66
|
-
const vertex_attribute_time_step = computed<
|
|
67
|
-
get: () => dataStyleStore.meshCellsVertexAttributeTimeStep(
|
|
71
|
+
const vertex_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
72
|
+
get: () => dataStyleStore.meshCellsVertexAttributeTimeStep(dataId),
|
|
68
73
|
set: async (newValue) => {
|
|
69
74
|
if (newValue === undefined) {
|
|
70
75
|
return;
|
|
71
76
|
}
|
|
72
|
-
await applyBatchStyle(
|
|
73
|
-
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeTimeStep(
|
|
77
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
78
|
+
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeTimeStep(meshId, newValue)),
|
|
74
79
|
);
|
|
75
80
|
hybridViewerStore.remoteRender();
|
|
76
81
|
},
|
|
77
82
|
});
|
|
78
|
-
const vertex_attribute_item = computed<
|
|
79
|
-
get: () => dataStyleStore.meshCellsVertexAttributeItem(
|
|
83
|
+
const vertex_attribute_item = computed<AttributeItem>({
|
|
84
|
+
get: () => dataStyleStore.meshCellsVertexAttributeItem(dataId),
|
|
80
85
|
set: async (newValue) => {
|
|
81
|
-
await applyBatchStyle(
|
|
82
|
-
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeItem(
|
|
86
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
87
|
+
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeItem(meshId, newValue)),
|
|
83
88
|
);
|
|
84
89
|
hybridViewerStore.remoteRender();
|
|
85
90
|
},
|
|
86
91
|
});
|
|
87
|
-
const vertex_attribute_range = computed<
|
|
88
|
-
get: () => dataStyleStore.meshCellsVertexAttributeRange(
|
|
92
|
+
const vertex_attribute_range = computed<AttributeRange>({
|
|
93
|
+
get: () => dataStyleStore.meshCellsVertexAttributeRange(dataId),
|
|
89
94
|
set: async (newValue) => {
|
|
90
95
|
const [minimum, maximum] = newValue;
|
|
91
96
|
if (minimum === undefined || maximum === undefined) {
|
|
92
97
|
return;
|
|
93
98
|
}
|
|
94
|
-
await applyBatchStyle(
|
|
95
|
-
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeRange(
|
|
99
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
100
|
+
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeRange(meshId, minimum, maximum)),
|
|
96
101
|
);
|
|
97
102
|
hybridViewerStore.remoteRender();
|
|
98
103
|
},
|
|
99
104
|
});
|
|
100
|
-
const vertex_attribute_color_map = computed<
|
|
101
|
-
get: () => dataStyleStore.meshCellsVertexAttributeColorMap(
|
|
105
|
+
const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
106
|
+
get: () => dataStyleStore.meshCellsVertexAttributeColorMap(dataId),
|
|
102
107
|
set: async (newValue) => {
|
|
103
|
-
await applyBatchStyle(
|
|
104
|
-
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeColorMap(
|
|
108
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
109
|
+
Promise.resolve(dataStyleStore.setMeshCellsVertexAttributeColorMap(meshId, newValue)),
|
|
105
110
|
);
|
|
106
111
|
hybridViewerStore.remoteRender();
|
|
107
112
|
},
|
|
108
113
|
});
|
|
109
114
|
const vertex_attribute_no_data_color = computed<RGBAColor>({
|
|
110
|
-
get: () => dataStyleStore.meshCellsVertexAttributeNoDataColor(
|
|
115
|
+
get: () => dataStyleStore.meshCellsVertexAttributeNoDataColor(dataId),
|
|
111
116
|
set: async (newValue) => {
|
|
112
|
-
await applyBatchStyle(
|
|
113
|
-
dataStyleStore.setMeshCellsVertexAttributeNoDataColor(
|
|
117
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
118
|
+
dataStyleStore.setMeshCellsVertexAttributeNoDataColor(meshId, newValue),
|
|
114
119
|
);
|
|
115
120
|
hybridViewerStore.remoteRender();
|
|
116
121
|
},
|
|
117
122
|
});
|
|
118
|
-
const cell_attribute_name = computed<
|
|
119
|
-
get: () => dataStyleStore.meshCellsCellAttributeName(
|
|
123
|
+
const cell_attribute_name = computed<AttributeName | undefined>({
|
|
124
|
+
get: () => dataStyleStore.meshCellsCellAttributeName(dataId),
|
|
120
125
|
set: async (newValue) => {
|
|
121
126
|
if (newValue === undefined) {
|
|
122
127
|
return;
|
|
123
128
|
}
|
|
124
|
-
await applyBatchStyle(
|
|
125
|
-
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeName(
|
|
129
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
130
|
+
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeName(meshId, newValue)),
|
|
126
131
|
);
|
|
127
132
|
hybridViewerStore.remoteRender();
|
|
128
133
|
},
|
|
129
134
|
});
|
|
130
135
|
|
|
131
|
-
const cell_attribute_time_step = computed<
|
|
132
|
-
get: () => dataStyleStore.meshCellsCellAttributeTimeStep(
|
|
136
|
+
const cell_attribute_time_step = computed<AttributeTimeStep | undefined>({
|
|
137
|
+
get: () => dataStyleStore.meshCellsCellAttributeTimeStep(dataId),
|
|
133
138
|
set: async (newValue) => {
|
|
134
139
|
if (newValue === undefined) {
|
|
135
140
|
return;
|
|
136
141
|
}
|
|
137
|
-
await applyBatchStyle(
|
|
138
|
-
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeTimeStep(
|
|
142
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
143
|
+
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeTimeStep(meshId, newValue)),
|
|
139
144
|
);
|
|
140
145
|
hybridViewerStore.remoteRender();
|
|
141
146
|
},
|
|
142
147
|
});
|
|
143
|
-
const cell_attribute_item = computed<
|
|
144
|
-
get: () => dataStyleStore.meshCellsCellAttributeItem(
|
|
148
|
+
const cell_attribute_item = computed<AttributeItem>({
|
|
149
|
+
get: () => dataStyleStore.meshCellsCellAttributeItem(dataId),
|
|
145
150
|
set: async (newValue) => {
|
|
146
|
-
await applyBatchStyle(
|
|
147
|
-
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeItem(
|
|
151
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
152
|
+
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeItem(meshId, newValue)),
|
|
148
153
|
);
|
|
149
154
|
hybridViewerStore.remoteRender();
|
|
150
155
|
},
|
|
151
156
|
});
|
|
152
|
-
const cell_attribute_range = computed<
|
|
153
|
-
get: () => dataStyleStore.meshCellsCellAttributeRange(
|
|
157
|
+
const cell_attribute_range = computed<AttributeRange>({
|
|
158
|
+
get: () => dataStyleStore.meshCellsCellAttributeRange(dataId),
|
|
154
159
|
set: async (newValue) => {
|
|
155
160
|
const [minimum, maximum] = newValue;
|
|
156
161
|
if (minimum === undefined || maximum === undefined) {
|
|
157
162
|
return;
|
|
158
163
|
}
|
|
159
|
-
await applyBatchStyle(
|
|
160
|
-
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeRange(
|
|
164
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
165
|
+
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeRange(meshId, minimum, maximum)),
|
|
161
166
|
);
|
|
162
167
|
hybridViewerStore.remoteRender();
|
|
163
168
|
},
|
|
164
169
|
});
|
|
165
|
-
const cell_attribute_color_map = computed<
|
|
166
|
-
get: () => dataStyleStore.meshCellsCellAttributeColorMap(
|
|
170
|
+
const cell_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
171
|
+
get: () => dataStyleStore.meshCellsCellAttributeColorMap(dataId),
|
|
167
172
|
set: async (newValue) => {
|
|
168
|
-
await applyBatchStyle(
|
|
169
|
-
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeColorMap(
|
|
173
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
174
|
+
Promise.resolve(dataStyleStore.setMeshCellsCellAttributeColorMap(meshId, newValue)),
|
|
170
175
|
);
|
|
171
176
|
hybridViewerStore.remoteRender();
|
|
172
177
|
},
|
|
173
178
|
});
|
|
174
179
|
const cell_attribute_no_data_color = computed<RGBAColor>({
|
|
175
|
-
get: () => dataStyleStore.meshCellsCellAttributeNoDataColor(
|
|
180
|
+
get: () => dataStyleStore.meshCellsCellAttributeNoDataColor(dataId),
|
|
176
181
|
set: async (newValue) => {
|
|
177
|
-
await applyBatchStyle(
|
|
178
|
-
dataStyleStore.setMeshCellsCellAttributeNoDataColor(
|
|
182
|
+
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
183
|
+
dataStyleStore.setMeshCellsCellAttributeNoDataColor(meshId, newValue),
|
|
179
184
|
);
|
|
180
185
|
hybridViewerStore.remoteRender();
|
|
181
186
|
},
|
|
182
187
|
});
|
|
183
188
|
|
|
184
189
|
async function setVertexAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
185
|
-
await applyRangesPerData(ranges, (
|
|
186
|
-
dataStyleStore.setMeshCellsVertexAttributeRange(
|
|
190
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
191
|
+
dataStyleStore.setMeshCellsVertexAttributeRange(meshId, minimum, maximum),
|
|
187
192
|
);
|
|
188
193
|
hybridViewerStore.remoteRender();
|
|
189
194
|
}
|
|
190
195
|
|
|
191
196
|
async function setCellAttributeRangesPerData(ranges: RangesPerData): Promise<void> {
|
|
192
|
-
await applyRangesPerData(ranges, (
|
|
193
|
-
dataStyleStore.setMeshCellsCellAttributeRange(
|
|
197
|
+
await applyRangesPerData(ranges, (meshId, minimum, maximum) =>
|
|
198
|
+
dataStyleStore.setMeshCellsCellAttributeRange(meshId, minimum, maximum),
|
|
194
199
|
);
|
|
195
200
|
hybridViewerStore.remoteRender();
|
|
196
201
|
}
|
|
@@ -198,7 +203,7 @@ async function setCellAttributeRangesPerData(ranges: RangesPerData): Promise<voi
|
|
|
198
203
|
|
|
199
204
|
<template>
|
|
200
205
|
<ViewerOptionsColoringTypeSelector
|
|
201
|
-
:id="
|
|
206
|
+
:data-id="dataId"
|
|
202
207
|
v-model:coloring_style_key="coloring_style_key"
|
|
203
208
|
v-model:color="color"
|
|
204
209
|
v-model:opacity="opacity"
|