@geode/opengeodeweb-front 10.44.0 → 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/ClippingPlanes.vue +7 -5
- package/app/components/CrsSelector.vue +2 -1
- package/app/components/ExtensionSelector.vue +8 -7
- package/app/components/FactorFilterPanel.vue +4 -4
- package/app/components/MissingFilesSelector.vue +2 -1
- package/app/components/ObjectSelector.vue +4 -3
- package/app/components/ThresholdCard.vue +6 -5
- package/app/components/ThresholdFilter.vue +11 -10
- package/app/components/TimeSeriesTargetSelector.vue +10 -7
- package/app/components/Viewer/ContextMenu/InfoCard.vue +12 -10
- package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +72 -63
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +12 -10
- package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +76 -71
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +72 -63
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -10
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +54 -45
- package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +76 -73
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +72 -67
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +29 -21
- package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +8 -6
- package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +15 -7
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +2 -1
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +13 -6
- package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +19 -11
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +2 -1
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +17 -10
- package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +3 -2
- package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +2 -1
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -2
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +29 -21
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +2 -2
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +2 -3
- package/app/components/Viewer/Options/AttributeSelector.vue +11 -7
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +10 -13
- package/app/components/Viewer/Options/TextureItem.vue +5 -4
- package/app/components/Viewer/Options/TexturesSelector.vue +5 -8
- package/app/components/Viewer/Options/TimeStepSlider.vue +3 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +6 -13
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +40 -38
- package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +69 -65
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +8 -6
- package/app/components/Viewer/Surface/PolygonsColoring.vue +73 -71
- package/app/components/Viewer/Surface/PolygonsOptions.vue +8 -6
- package/app/composables/attribute_coloring_style.ts +17 -12
- package/app/composables/attribute_selector.ts +9 -15
- package/app/composables/batch_style.ts +25 -16
- package/app/composables/batch_style_model.ts +6 -5
- package/app/composables/clipping_planes_widget.ts +2 -5
- package/app/composables/clipping_slices.ts +2 -1
- package/app/composables/hover_highlight.ts +17 -16
- package/app/composables/live_data_item.ts +3 -2
- package/app/composables/model_attribute_style.ts +2 -1
- package/app/composables/model_menu_context.ts +3 -4
- package/app/composables/model_tree.ts +3 -2
- package/app/composables/project_manager_helpers/types.ts +10 -4
- package/app/composables/tree_filter.ts +3 -3
- package/app/composables/tree_keyboard_nav.ts +1 -6
- package/app/composables/tree_scroll.ts +2 -0
- package/app/composables/use_overlapping_picker.ts +9 -9
- package/app/stores/basemap_helpers/georeferenced.ts +1 -1
- package/app/stores/basemap_helpers/viewer.ts +2 -1
- package/app/stores/crs.ts +6 -5
- package/app/stores/data.ts +84 -69
- package/app/stores/data_helpers/collections.ts +13 -21
- package/app/stores/data_helpers/mesh.ts +19 -24
- package/app/stores/data_helpers/relations.ts +12 -12
- package/app/stores/data_style.ts +26 -20
- package/app/stores/menu.ts +17 -11
- package/app/stores/treeview.ts +28 -27
- package/app/types/attribute.ts +37 -0
- package/app/types/identifiers.ts +72 -0
- package/app/types/style.ts +13 -0
- package/app/types/texture.ts +6 -0
- package/app/types/tree.ts +17 -0
- package/app/utils/attribute_range.ts +2 -1
- package/app/utils/attributes.ts +13 -4
- package/app/utils/basemap_tree.ts +3 -5
- package/app/utils/clipping_planes.ts +6 -4
- package/app/utils/clipping_planes_scene.ts +4 -3
- package/app/utils/crs.ts +4 -1
- package/app/utils/default_styles/constants.ts +8 -1
- package/app/utils/default_styles/mesh_components.ts +21 -25
- package/app/utils/default_styles/meshes.ts +7 -22
- package/app/utils/default_styles/model_components.ts +22 -26
- package/app/utils/default_styles/models.ts +11 -13
- package/app/utils/import_workflow.ts +37 -29
- package/app/utils/legacy_data_id.ts +16 -0
- package/app/utils/slice.ts +7 -2
- package/app/utils/threshold.ts +1 -8
- package/app/utils/threshold_sources.ts +8 -5
- package/app/utils/treeview.ts +3 -2
- package/internal/database/tables/data.ts +1 -1
- package/internal/database/tables/data_style.ts +1 -1
- package/internal/database/tables/model_components.ts +1 -1
- package/internal/database/tables/model_components_relation.ts +1 -1
- package/internal/stores/data_style/attribute_default.ts +14 -0
- package/internal/stores/data_style/attribute_types.ts +59 -0
- package/internal/stores/data_style/attribute_valid.ts +16 -0
- package/internal/stores/data_style/mesh/base_style.ts +17 -15
- package/internal/stores/data_style/mesh/cells/cell.ts +64 -49
- package/internal/stores/data_style/mesh/cells/cell_attribute.ts +42 -66
- package/internal/stores/data_style/mesh/cells/cell_config.ts +59 -53
- package/internal/stores/data_style/mesh/cells/color.ts +8 -7
- package/internal/stores/data_style/mesh/cells/common.ts +16 -15
- package/internal/stores/data_style/mesh/cells/index.ts +49 -47
- package/internal/stores/data_style/mesh/cells/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/cells/textures.ts +8 -7
- package/internal/stores/data_style/mesh/cells/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/cells/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/cells/visibility.ts +11 -7
- package/internal/stores/data_style/mesh/edges/color.ts +8 -7
- package/internal/stores/data_style/mesh/edges/common.ts +13 -12
- package/internal/stores/data_style/mesh/edges/edge.ts +64 -49
- package/internal/stores/data_style/mesh/edges/edge_attribute.ts +42 -66
- package/internal/stores/data_style/mesh/edges/edge_config.ts +59 -53
- package/internal/stores/data_style/mesh/edges/index.ts +49 -47
- package/internal/stores/data_style/mesh/edges/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/edges/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/edges/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/edges/visibility.ts +11 -7
- package/internal/stores/data_style/mesh/edges/width.ts +9 -7
- package/internal/stores/data_style/mesh/index.ts +27 -24
- package/internal/stores/data_style/mesh/points/color.ts +8 -7
- package/internal/stores/data_style/mesh/points/common.ts +16 -14
- package/internal/stores/data_style/mesh/points/index.ts +39 -37
- package/internal/stores/data_style/mesh/points/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/points/size.ts +9 -7
- package/internal/stores/data_style/mesh/points/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/points/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/points/vertex_config.ts +62 -53
- package/internal/stores/data_style/mesh/points/visibility.ts +8 -6
- package/internal/stores/data_style/mesh/polygons/color.ts +8 -7
- package/internal/stores/data_style/mesh/polygons/common.ts +19 -15
- package/internal/stores/data_style/mesh/polygons/index.ts +49 -50
- package/internal/stores/data_style/mesh/polygons/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/polygons/polygon.ts +66 -50
- package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polygons/polygon_config.ts +65 -53
- package/internal/stores/data_style/mesh/polygons/textures.ts +8 -7
- package/internal/stores/data_style/mesh/polygons/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polygons/vertex_config.ts +65 -53
- package/internal/stores/data_style/mesh/polygons/visibility.ts +12 -7
- package/internal/stores/data_style/mesh/polyhedra/color.ts +13 -9
- package/internal/stores/data_style/mesh/polyhedra/common.ts +13 -12
- package/internal/stores/data_style/mesh/polyhedra/index.ts +51 -51
- package/internal/stores/data_style/mesh/polyhedra/opacity.ts +12 -10
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +59 -53
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +46 -69
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +65 -55
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +66 -50
- package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +37 -67
- package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +65 -53
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +12 -7
- package/internal/stores/data_style/model/blocks/apply_coloring.ts +11 -12
- package/internal/stores/data_style/model/blocks/color.ts +25 -26
- package/internal/stores/data_style/model/blocks/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/blocks/common.ts +26 -22
- package/internal/stores/data_style/model/blocks/index.ts +8 -7
- package/internal/stores/data_style/model/blocks/polyhedron.ts +114 -135
- package/internal/stores/data_style/model/blocks/vertex.ts +110 -132
- package/internal/stores/data_style/model/blocks/visibility.ts +11 -9
- package/internal/stores/data_style/model/color.ts +55 -41
- package/internal/stores/data_style/model/common.ts +16 -14
- package/internal/stores/data_style/model/component_style.ts +0 -16
- package/internal/stores/data_style/model/corners/color.ts +21 -19
- package/internal/stores/data_style/model/corners/common.ts +26 -22
- package/internal/stores/data_style/model/corners/index.ts +21 -24
- package/internal/stores/data_style/model/corners/vertex.ts +103 -122
- package/internal/stores/data_style/model/corners/visibility.ts +11 -9
- package/internal/stores/data_style/model/edges/common.ts +7 -6
- package/internal/stores/data_style/model/edges/component.ts +63 -55
- package/internal/stores/data_style/model/edges/visibility.ts +24 -16
- package/internal/stores/data_style/model/edges/width.ts +10 -8
- package/internal/stores/data_style/model/index.ts +7 -6
- package/internal/stores/data_style/model/lines/apply_coloring.ts +11 -9
- package/internal/stores/data_style/model/lines/color.ts +25 -23
- package/internal/stores/data_style/model/lines/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/lines/common.ts +29 -21
- package/internal/stores/data_style/model/lines/edge.ts +109 -128
- package/internal/stores/data_style/model/lines/index.ts +8 -7
- package/internal/stores/data_style/model/lines/vertex.ts +109 -128
- package/internal/stores/data_style/model/lines/visibility.ts +11 -9
- package/internal/stores/data_style/model/points/common.ts +7 -6
- package/internal/stores/data_style/model/points/component.ts +62 -54
- package/internal/stores/data_style/model/points/index.ts +12 -7
- package/internal/stores/data_style/model/points/size.ts +10 -8
- package/internal/stores/data_style/model/points/visibility.ts +13 -8
- package/internal/stores/data_style/model/selection.ts +6 -11
- package/internal/stores/data_style/model/surfaces/apply_coloring.ts +11 -15
- package/internal/stores/data_style/model/surfaces/color.ts +31 -23
- package/internal/stores/data_style/model/surfaces/coloring_groups.ts +5 -9
- package/internal/stores/data_style/model/surfaces/common.ts +26 -22
- package/internal/stores/data_style/model/surfaces/index.ts +8 -7
- package/internal/stores/data_style/model/surfaces/polygon.ts +113 -138
- package/internal/stores/data_style/model/surfaces/vertex.ts +117 -133
- package/internal/stores/data_style/model/surfaces/visibility.ts +11 -9
- package/internal/stores/data_style/model/visibility.ts +18 -16
- package/internal/stores/data_style/model/visibility_dispatch.ts +4 -4
- package/internal/stores/data_style/state.ts +7 -6
- package/internal/stores/data_style/state_shared.ts +11 -10
- package/internal/stores/data_style/time_step.ts +21 -15
- package/internal/stores/data_style/types.ts +4 -3
- package/internal/stores/hybrid_viewer/camera.ts +11 -6
- package/internal/stores/hybrid_viewer/filters.ts +16 -14
- package/internal/stores/hybrid_viewer/highlight.ts +6 -5
- package/internal/stores/hybrid_viewer/scene.ts +20 -18
- package/internal/stores/hybrid_viewer/vtk_types.ts +2 -2
- package/internal/utils/api_fetch.ts +1 -1
- package/internal/utils/upload_file.ts +1 -7
- package/package.json +4 -4
- package/shared/utils/fetch_raw.ts +7 -8
|
@@ -38,14 +38,14 @@ const planes = ref<ClippingPlane[]>([createPlane(undefined, [1, 0, 0])]);
|
|
|
38
38
|
const allItems = dataStore.refRegisteredItems();
|
|
39
39
|
const targetIds = computed<string[]>(() => {
|
|
40
40
|
if (targetAllVisible.value) {
|
|
41
|
-
return allItems.value.map((item) => item.
|
|
41
|
+
return allItems.value.map((item) => item.data_id);
|
|
42
42
|
}
|
|
43
43
|
return selectedDatasetIds.value;
|
|
44
44
|
});
|
|
45
45
|
const availableDatasets = computed<{ title: string; value: string }[]>(() =>
|
|
46
46
|
allItems.value.map((item) => ({
|
|
47
|
-
title: item.name || item.
|
|
48
|
-
value: item.
|
|
47
|
+
title: item.name || item.data_id,
|
|
48
|
+
value: item.data_id,
|
|
49
49
|
})),
|
|
50
50
|
);
|
|
51
51
|
const widgetContainer = useTemplateRef("widgetContainer");
|
|
@@ -70,7 +70,9 @@ const {
|
|
|
70
70
|
});
|
|
71
71
|
|
|
72
72
|
function getUntargetedIds(): string[] {
|
|
73
|
-
return allItems.value
|
|
73
|
+
return allItems.value
|
|
74
|
+
.map((item) => item.data_id)
|
|
75
|
+
.filter((dataId) => !targetIds.value.includes(dataId));
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
const {
|
|
@@ -144,7 +146,7 @@ async function resetClippingPlanes(): Promise<void> {
|
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
async function removeClippingPlanes(): Promise<void> {
|
|
147
|
-
const allIds = allItems.value.map((item) => item.
|
|
149
|
+
const allIds = allItems.value.map((item) => item.data_id);
|
|
148
150
|
await hybridViewerStore.setClippingPlanes(allIds, []);
|
|
149
151
|
await removeSlices(allIds);
|
|
150
152
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { CRSList } from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
3
|
+
import type { GeodeObjectType } from "@ogw_front/types/identifiers";
|
|
3
4
|
import { useCrsStore } from "@ogw_front/stores/crs";
|
|
4
5
|
|
|
5
6
|
interface Props {
|
|
6
|
-
geodeObjectType:
|
|
7
|
+
geodeObjectType: GeodeObjectType;
|
|
7
8
|
// Narrow containers: one "AUTHORITY:CODE" column and a truncated name
|
|
8
9
|
compact?: boolean;
|
|
9
10
|
}
|
|
@@ -2,24 +2,25 @@
|
|
|
2
2
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
3
3
|
|
|
4
4
|
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
5
|
+
import type { GeodeObjectType } from "@ogw_front/types/identifiers";
|
|
5
6
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
6
7
|
|
|
7
8
|
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions;
|
|
8
9
|
const emit = defineEmits<{
|
|
9
|
-
update_values: [values: { output_geode_object:
|
|
10
|
+
update_values: [values: { output_geode_object: GeodeObjectType; output_extension: string }];
|
|
10
11
|
increment_step: [];
|
|
11
12
|
decrement_step: [];
|
|
12
13
|
}>();
|
|
13
14
|
|
|
14
15
|
interface Props {
|
|
15
|
-
geodeObjectType:
|
|
16
|
+
geodeObjectType: GeodeObjectType;
|
|
16
17
|
filenames: string[];
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
const { geodeObjectType, filenames } = defineProps<Props>();
|
|
20
21
|
type OutputExtensions = Record<string, { is_saveable: boolean }>;
|
|
21
22
|
|
|
22
|
-
const geode_objects_and_output_extensions = ref<Record<
|
|
23
|
+
const geode_objects_and_output_extensions = ref<Record<GeodeObjectType, OutputExtensions>>({});
|
|
23
24
|
const loading = ref<boolean>(false);
|
|
24
25
|
|
|
25
26
|
const toggle_loading = useToggle(loading);
|
|
@@ -28,8 +29,8 @@ async function get_output_file_extensions(): Promise<void> {
|
|
|
28
29
|
toggle_loading();
|
|
29
30
|
geode_objects_and_output_extensions.value = {};
|
|
30
31
|
const backStore = useBackStore();
|
|
31
|
-
const values: Record<
|
|
32
|
-
filenames.map(async (filename): Promise<Record<
|
|
32
|
+
const values: Record<GeodeObjectType, Record<string, boolean>>[] = await Promise.all(
|
|
33
|
+
filenames.map(async (filename): Promise<Record<GeodeObjectType, Record<string, boolean>>> => {
|
|
33
34
|
const params = { geode_object_type: geodeObjectType, filename };
|
|
34
35
|
const response = await backStore.request({ schema, params });
|
|
35
36
|
return response.geode_objects_and_output_extensions;
|
|
@@ -37,7 +38,7 @@ async function get_output_file_extensions(): Promise<void> {
|
|
|
37
38
|
);
|
|
38
39
|
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))];
|
|
39
40
|
const common_keys = all_keys.filter((i) => !values.some((j) => !Object.keys(j).includes(i)));
|
|
40
|
-
const final_object: Record<
|
|
41
|
+
const final_object: Record<GeodeObjectType, OutputExtensions> = {};
|
|
41
42
|
for (const key of common_keys) {
|
|
42
43
|
final_object[key] = {};
|
|
43
44
|
for (const value of values) {
|
|
@@ -54,7 +55,7 @@ async function get_output_file_extensions(): Promise<void> {
|
|
|
54
55
|
toggle_loading();
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
function update_values(output_geode_object:
|
|
58
|
+
function update_values(output_geode_object: GeodeObjectType, output_extension: string): void {
|
|
58
59
|
if (output_geode_object !== "" && output_extension !== "") {
|
|
59
60
|
emit("update_values", {
|
|
60
61
|
output_geode_object,
|
|
@@ -46,8 +46,8 @@ const factor = ref<number>(factorRange.defaultValue);
|
|
|
46
46
|
const allItems = dataStore.refRegisteredItems();
|
|
47
47
|
const availableDatasets = computed<{ title: string; value: string }[]>(() =>
|
|
48
48
|
allItems.value.map((item) => ({
|
|
49
|
-
title: item.name || item.
|
|
50
|
-
value: item.
|
|
49
|
+
title: item.name || item.data_id,
|
|
50
|
+
value: item.data_id,
|
|
51
51
|
})),
|
|
52
52
|
);
|
|
53
53
|
|
|
@@ -55,12 +55,12 @@ let appliedFactor: number | undefined = undefined;
|
|
|
55
55
|
|
|
56
56
|
async function applyFactor(): Promise<void> {
|
|
57
57
|
appliedFactor = factor.value;
|
|
58
|
-
const allIds = allItems.value.map((item) => item.
|
|
58
|
+
const allIds = allItems.value.map((item) => item.data_id);
|
|
59
59
|
if (allIds.length === 0) {
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
const targetIds = targetAllVisible.value ? allIds : selectedDatasetIds.value;
|
|
63
|
-
const untargetedIds = allIds.filter((
|
|
63
|
+
const untargetedIds = allIds.filter((dataId) => !targetIds.includes(dataId));
|
|
64
64
|
|
|
65
65
|
if (targetIds.length > 0) {
|
|
66
66
|
await setFactor(targetIds, Number(factor.value));
|
|
@@ -5,6 +5,7 @@ import { matchExpectedFiles, uploadPath } from "@ogw_front/utils/upload_path";
|
|
|
5
5
|
import DragAndDrop from "@ogw_front/components/DragAndDrop.vue";
|
|
6
6
|
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
7
7
|
import FileUploader from "@ogw_front/components/FileUploader.vue";
|
|
8
|
+
import type { GeodeObjectType } from "@ogw_front/types/identifiers";
|
|
8
9
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
9
10
|
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
10
11
|
|
|
@@ -35,7 +36,7 @@ const emit = defineEmits<Emits>();
|
|
|
35
36
|
interface Props {
|
|
36
37
|
multiple: boolean;
|
|
37
38
|
// Filename -> geode object type, each file is checked with its own type (unused for time series)
|
|
38
|
-
geodeObjectTypes?: Record<string,
|
|
39
|
+
geodeObjectTypes?: Record<string, GeodeObjectType>;
|
|
39
40
|
filenames: string[];
|
|
40
41
|
files?: UploadFile[];
|
|
41
42
|
timeSeries?: boolean;
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
resolveAllowedObjectsPerFile,
|
|
6
6
|
} from "@ogw_shared/utils/response_handlers/load.js";
|
|
7
7
|
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
8
|
+
import type { GeodeObjectType } from "@ogw_front/types/identifiers";
|
|
8
9
|
import { geode_objects } from "@ogw_front/assets/geode_objects";
|
|
9
10
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
10
11
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
@@ -26,7 +27,7 @@ interface PendingGroup {
|
|
|
26
27
|
|
|
27
28
|
const emit = defineEmits<{
|
|
28
29
|
// Filename -> geode object type, files that cannot be loaded are left out
|
|
29
|
-
update_values: [value: { geode_object_types: Record<string,
|
|
30
|
+
update_values: [value: { geode_object_types: Record<string, GeodeObjectType> }];
|
|
30
31
|
increment_step: [];
|
|
31
32
|
}>();
|
|
32
33
|
|
|
@@ -60,12 +61,12 @@ async function fetchAllowedObjectsList(): Promise<AllowedObjectMap[]> {
|
|
|
60
61
|
return responses.map((response) => response.allowed_objects);
|
|
61
62
|
}
|
|
62
63
|
|
|
63
|
-
function emitGeodeObjectTypes(geode_object_types: Record<string,
|
|
64
|
+
function emitGeodeObjectTypes(geode_object_types: Record<string, GeodeObjectType>): void {
|
|
64
65
|
emit("update_values", { geode_object_types });
|
|
65
66
|
emit("increment_step");
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
function setGeodeObject(geode_object_type:
|
|
69
|
+
function setGeodeObject(geode_object_type: GeodeObjectType | undefined): void {
|
|
69
70
|
if (!geode_object_type) {
|
|
70
71
|
return;
|
|
71
72
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import {
|
|
3
3
|
type AttributeInfo,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from "@ogw_front/utils/
|
|
4
|
+
attributeArrayName,
|
|
5
|
+
getAttributeRange,
|
|
6
|
+
} from "@ogw_front/utils/attributes";
|
|
7
|
+
import { type AttributeSource, isValidThresholdAttribute } from "@ogw_front/utils/threshold";
|
|
7
8
|
import type { Threshold, ThresholdAttribute } from "@ogw_internal/stores/hybrid_viewer/filters";
|
|
8
|
-
import {
|
|
9
|
+
import type { AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
9
10
|
import ViewerOptionsAttributeRangeSelector from "@ogw_front/components/Viewer/Options/AttributeRangeSelector.vue";
|
|
10
11
|
import { fetchAttributeRange } from "@ogw_front/utils/attribute_range";
|
|
11
12
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
@@ -50,7 +51,7 @@ const currentSource = computed<AttributeSource | undefined>(
|
|
|
50
51
|
const currentAttribute = computed<AttributeInfo | undefined>(() =>
|
|
51
52
|
attributes.value.find((attribute) => attribute.attribute_name === attributeName.value),
|
|
52
53
|
);
|
|
53
|
-
const currentTimeStep = computed<
|
|
54
|
+
const currentTimeStep = computed<AttributeTimeStep | undefined>(() => {
|
|
54
55
|
if (!currentSource.value || !currentAttribute.value?.time_steps?.length) {
|
|
55
56
|
return undefined;
|
|
56
57
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type { Threshold, ThresholdAttribute } from "@ogw_internal/stores/hybrid_viewer/filters";
|
|
3
3
|
import type { AttributeSource } from "@ogw_front/utils/threshold";
|
|
4
|
+
import type { DataId } from "@ogw_front/types/identifiers";
|
|
4
5
|
import ThresholdCard from "@ogw_front/components/ThresholdCard.vue";
|
|
5
6
|
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
|
|
6
7
|
import { fetchSources } from "@ogw_front/utils/threshold_sources";
|
|
@@ -32,8 +33,8 @@ const cards = useTemplateRef("cards");
|
|
|
32
33
|
const allItems = dataStore.refAllItems();
|
|
33
34
|
const availableDatasets = computed<{ title: string; value: string }[]>(() =>
|
|
34
35
|
allItems.value.map((item) => ({
|
|
35
|
-
title: item.name || item.
|
|
36
|
-
value: item.
|
|
36
|
+
title: item.name || item.data_id,
|
|
37
|
+
value: item.data_id,
|
|
37
38
|
})),
|
|
38
39
|
);
|
|
39
40
|
|
|
@@ -63,9 +64,9 @@ function removeThreshold(index: number): void {
|
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
async function clearThresholds(
|
|
67
|
-
hybridViewerStore.removeThresholds(
|
|
68
|
-
await hybridViewerStore.setThreshold([
|
|
67
|
+
async function clearThresholds(dataId: DataId): Promise<void> {
|
|
68
|
+
hybridViewerStore.removeThresholds(dataId);
|
|
69
|
+
await hybridViewerStore.setThreshold([dataId], []);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
async function resetRanges(): Promise<void> {
|
|
@@ -79,17 +80,17 @@ async function removeThresholds(): Promise<void> {
|
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
watch(selectedDatasetId, async (
|
|
83
|
+
watch(selectedDatasetId, async (dataId, previousId) => {
|
|
83
84
|
if (previousId) {
|
|
84
85
|
await clearThresholds(previousId);
|
|
85
86
|
}
|
|
86
|
-
if (
|
|
87
|
-
sources.value = await fetchSources(dataStore,
|
|
87
|
+
if (dataId) {
|
|
88
|
+
sources.value = await fetchSources(dataStore, dataId);
|
|
88
89
|
} else {
|
|
89
90
|
sources.value = [];
|
|
90
91
|
}
|
|
91
|
-
if (
|
|
92
|
-
hybridViewerStore.addThreshold(
|
|
92
|
+
if (dataId && hybridViewerStore.getThresholds(dataId).length === 0) {
|
|
93
|
+
hybridViewerStore.addThreshold(dataId);
|
|
93
94
|
}
|
|
94
95
|
});
|
|
95
96
|
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
3
3
|
|
|
4
|
+
import type {
|
|
5
|
+
DataIdentified,
|
|
6
|
+
GeodeObjectType,
|
|
7
|
+
GeodeObjectTyped,
|
|
8
|
+
} from "@ogw_front/types/identifiers";
|
|
4
9
|
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
5
10
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
6
11
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
7
12
|
|
|
8
13
|
const schema = schemas.opengeodeweb_back.time_series_allowed_objects;
|
|
9
14
|
|
|
10
|
-
interface Target {
|
|
11
|
-
id: string;
|
|
15
|
+
interface Target extends DataIdentified, GeodeObjectTyped {
|
|
12
16
|
name: string;
|
|
13
|
-
geode_object_type: string;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
const emit = defineEmits<{
|
|
17
|
-
update_values: [values: { target_id: string; geode_object_type:
|
|
20
|
+
update_values: [values: { target_id: string; geode_object_type: GeodeObjectType }];
|
|
18
21
|
increment_step: [];
|
|
19
22
|
decrement_step: [];
|
|
20
23
|
}>();
|
|
@@ -33,12 +36,12 @@ async function get_targets(): Promise<void> {
|
|
|
33
36
|
]);
|
|
34
37
|
targets.value = items
|
|
35
38
|
.filter((item) => allowed_objects.includes(item.geode_object_type))
|
|
36
|
-
.map(({
|
|
39
|
+
.map(({ data_id, name, geode_object_type }) => ({ data_id, name, geode_object_type }));
|
|
37
40
|
loading.value = false;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
function select(target: Target): void {
|
|
41
|
-
emit("update_values", { target_id: target.
|
|
44
|
+
emit("update_values", { target_id: target.data_id, geode_object_type: target.geode_object_type });
|
|
42
45
|
emit("increment_step");
|
|
43
46
|
}
|
|
44
47
|
|
|
@@ -59,7 +62,7 @@ await get_targets();
|
|
|
59
62
|
<v-list v-else bg-color="transparent">
|
|
60
63
|
<v-list-item
|
|
61
64
|
v-for="target in targets"
|
|
62
|
-
:key="target.
|
|
65
|
+
:key="target.data_id"
|
|
63
66
|
data-testid="timeSeriesTarget"
|
|
64
67
|
:title="target.name"
|
|
65
68
|
:subtitle="target.geode_object_type"
|
|
@@ -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"
|