@geode/opengeodeweb-front 12.0.0-rc.1 → 12.0.0
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/.build/shared/utils/response_handlers/load.js +5 -2
- package/app/assets/geode_objects.ts +37 -108
- package/app/assets/img/geode_objects/HorizonStack3D.svg +10 -0
- package/app/components/CrsSelector.vue +6 -6
- package/app/components/ExtensionSelector.vue +21 -14
- package/app/components/MissingFilesSelector.vue +1 -1
- package/app/components/ObjectSelector.vue +7 -14
- package/app/components/ThresholdFilter.vue +1 -1
- package/app/components/TimeSeriesTargetSelector.vue +2 -5
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +1 -1
- package/app/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue +12 -9
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +2 -2
- package/app/components/Viewer/Generic/Mesh/CellsColoring.vue +12 -9
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +1 -1
- package/app/components/Viewer/Generic/Mesh/EdgesColoring.vue +12 -9
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +3 -3
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +12 -8
- package/app/components/Viewer/Generic/Mesh/PolygonsColoring.vue +12 -9
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +1 -1
- package/app/components/Viewer/Generic/Mesh/PolyhedraColoring.vue +12 -9
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +1 -1
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +16 -17
- package/app/components/Viewer/Generic/Model/ComponentEdgesOptions.vue +11 -6
- package/app/components/Viewer/Generic/Model/ComponentPointsOptions.vue +11 -6
- package/app/components/Viewer/Generic/Model/CornerComponentOptions.vue +7 -8
- package/app/components/Viewer/Generic/Model/CornersTypeOptions.vue +7 -8
- package/app/components/Viewer/Generic/Model/LineComponentOptions.vue +9 -10
- package/app/components/Viewer/Generic/Model/LinesTypeOptions.vue +9 -10
- package/app/components/Viewer/Generic/Model/ModelEdgesCard.vue +2 -2
- package/app/components/Viewer/Generic/Model/ModelPointsCard.vue +1 -1
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +3 -4
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +16 -17
- package/app/components/Viewer/ObjectTree/Layout.vue +2 -2
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +2 -1
- package/app/components/Viewer/Options/AttributeSelector.vue +1 -1
- package/app/components/Viewer/Options/ColorPicker.vue +3 -3
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +8 -8
- package/app/components/Viewer/Options/TextureItem.vue +2 -6
- package/app/components/Viewer/Options/TexturesSelector.vue +1 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +3 -3
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +4 -5
- package/app/components/Viewer/Scene/BackgroundOptions.vue +2 -2
- package/app/components/Viewer/Scene/TextOptions.vue +2 -2
- package/app/components/Viewer/Solid/SpecificPolyhedraColoring.vue +12 -12
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +1 -1
- package/app/components/Viewer/Surface/PolygonsColoring.vue +12 -12
- package/app/components/Viewer/Surface/PolygonsOptions.vue +1 -1
- package/app/composables/attribute_selector.ts +1 -1
- package/app/composables/batch_style.ts +3 -3
- package/app/composables/batch_style_model.ts +1 -1
- package/app/composables/clipping_slices.ts +2 -1
- package/app/composables/hover_highlight.ts +10 -7
- package/app/composables/live_data_item.ts +1 -1
- package/app/composables/model_menu_context.ts +11 -4
- package/app/composables/project_manager_helpers/types.ts +2 -2
- package/app/composables/use_overlapping_picker.ts +10 -8
- package/app/composables/viewer_context_menu.ts +4 -2
- package/app/composables/viewer_reset.ts +4 -5
- package/app/stores/basemap_helpers/builds.ts +2 -2
- package/app/stores/basemap_helpers/viewer.ts +1 -1
- package/app/stores/crs.ts +12 -12
- package/app/stores/data.ts +4 -5
- package/app/stores/data_helpers/mesh.ts +2 -1
- package/app/stores/data_style.ts +4 -3
- package/app/stores/menu.ts +18 -12
- package/app/stores/treeview.ts +5 -4
- package/app/types/attribute.ts +5 -21
- package/app/types/identifiers.ts +5 -15
- package/app/utils/attribute_range.ts +1 -1
- package/app/utils/attributes.ts +2 -1
- package/app/utils/clipping_planes.ts +1 -1
- package/app/utils/color_picker.ts +3 -3
- package/app/utils/crs.ts +6 -6
- package/app/utils/default_styles/constants.ts +17 -22
- package/app/utils/default_styles/index.ts +3 -3
- package/app/utils/default_styles/mesh_components.ts +15 -11
- package/app/utils/default_styles/meshes.ts +1 -1
- package/app/utils/default_styles/model_components.ts +14 -10
- package/app/utils/default_styles/models.ts +1 -1
- package/app/utils/import_workflow.ts +3 -1
- package/app/utils/legacy_data_id.ts +2 -1
- package/app/utils/slice.ts +2 -1
- package/app/utils/threshold_sources.ts +1 -1
- package/internal/stores/data_style/attribute_types.ts +6 -6
- package/internal/stores/data_style/mesh/base_style.ts +6 -7
- package/internal/stores/data_style/mesh/cells/cell.ts +6 -6
- package/internal/stores/data_style/mesh/cells/cell_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/cells/cell_config.ts +5 -6
- package/internal/stores/data_style/mesh/cells/color.ts +6 -6
- package/internal/stores/data_style/mesh/cells/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/cells/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/cells/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/cells/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/cells/visibility.ts +1 -1
- package/internal/stores/data_style/mesh/edges/color.ts +6 -6
- package/internal/stores/data_style/mesh/edges/edge.ts +6 -6
- package/internal/stores/data_style/mesh/edges/edge_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/edges/edge_config.ts +5 -6
- package/internal/stores/data_style/mesh/edges/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/edges/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/edges/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/edges/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/edges/visibility.ts +1 -1
- package/internal/stores/data_style/mesh/edges/width.ts +6 -6
- package/internal/stores/data_style/mesh/index.ts +3 -4
- package/internal/stores/data_style/mesh/points/color.ts +6 -6
- package/internal/stores/data_style/mesh/points/common.ts +1 -1
- package/internal/stores/data_style/mesh/points/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/points/size.ts +6 -6
- package/internal/stores/data_style/mesh/points/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/points/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/points/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/points/visibility.ts +1 -1
- package/internal/stores/data_style/mesh/polygons/color.ts +6 -6
- package/internal/stores/data_style/mesh/polygons/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/polygons/polygon.ts +6 -6
- package/internal/stores/data_style/mesh/polygons/polygon_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/polygons/polygon_config.ts +5 -6
- package/internal/stores/data_style/mesh/polygons/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/polygons/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/polygons/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/polygons/visibility.ts +1 -1
- package/internal/stores/data_style/mesh/polyhedra/color.ts +6 -6
- package/internal/stores/data_style/mesh/polyhedra/opacity.ts +3 -4
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +6 -6
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/polyhedra/polyhedron_config.ts +5 -6
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +6 -6
- package/internal/stores/data_style/mesh/polyhedra/vertex_attribute.ts +8 -6
- package/internal/stores/data_style/mesh/polyhedra/vertex_config.ts +5 -6
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +1 -1
- package/internal/stores/data_style/model/blocks/color.ts +6 -6
- package/internal/stores/data_style/model/blocks/coloring_groups.ts +2 -2
- package/internal/stores/data_style/model/blocks/polyhedron.ts +12 -9
- package/internal/stores/data_style/model/blocks/vertex.ts +12 -9
- package/internal/stores/data_style/model/blocks/visibility.ts +1 -1
- package/internal/stores/data_style/model/color.ts +10 -11
- package/internal/stores/data_style/model/common.ts +3 -4
- package/internal/stores/data_style/model/corners/color.ts +6 -6
- package/internal/stores/data_style/model/corners/index.ts +2 -2
- package/internal/stores/data_style/model/corners/vertex.ts +12 -9
- package/internal/stores/data_style/model/corners/visibility.ts +1 -1
- package/internal/stores/data_style/model/edges/component.ts +13 -13
- package/internal/stores/data_style/model/edges/visibility.ts +1 -1
- package/internal/stores/data_style/model/edges/width.ts +6 -6
- package/internal/stores/data_style/model/lines/color.ts +6 -6
- package/internal/stores/data_style/model/lines/coloring_groups.ts +2 -2
- package/internal/stores/data_style/model/lines/edge.ts +12 -9
- package/internal/stores/data_style/model/lines/vertex.ts +12 -9
- package/internal/stores/data_style/model/lines/visibility.ts +1 -1
- package/internal/stores/data_style/model/points/component.ts +17 -13
- package/internal/stores/data_style/model/points/index.ts +2 -2
- package/internal/stores/data_style/model/points/size.ts +6 -6
- package/internal/stores/data_style/model/points/visibility.ts +1 -1
- package/internal/stores/data_style/model/surfaces/color.ts +6 -6
- package/internal/stores/data_style/model/surfaces/coloring_groups.ts +2 -2
- package/internal/stores/data_style/model/surfaces/polygon.ts +12 -9
- package/internal/stores/data_style/model/surfaces/vertex.ts +12 -9
- package/internal/stores/data_style/model/surfaces/visibility.ts +1 -1
- package/internal/stores/data_style/model/visibility.ts +1 -1
- package/internal/stores/data_style/scene.ts +5 -5
- package/internal/stores/data_style/time_step.ts +3 -2
- package/internal/stores/data_style/types.ts +3 -4
- package/internal/stores/hybrid_viewer/camera.ts +1 -1
- package/internal/stores/hybrid_viewer/filters.ts +2 -2
- package/internal/stores/hybrid_viewer/highlight.ts +2 -1
- package/internal/stores/hybrid_viewer/scene.ts +3 -3
- package/package.json +5 -4
- package/shared/utils/response_handlers/load.ts +19 -11
- package/app/types/style.ts +0 -13
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
function getFileExtension(filename) {
|
|
3
3
|
return filename.slice(filename.lastIndexOf(".") + 1);
|
|
4
4
|
}
|
|
5
|
+
function allowedObjectTypes(objectMap) {
|
|
6
|
+
return Object.keys(objectMap);
|
|
7
|
+
}
|
|
5
8
|
function getObject(objectMap, key) {
|
|
6
9
|
const object = objectMap[key];
|
|
7
10
|
if (!object) throw new Error(`Unknown geode object key: ${key}`);
|
|
8
11
|
return object;
|
|
9
12
|
}
|
|
10
13
|
function intersectAllowedObjects(allowedObjectsList) {
|
|
11
|
-
const allKeys = [...new Set(allowedObjectsList.flatMap((object) =>
|
|
14
|
+
const allKeys = [...new Set(allowedObjectsList.flatMap((object) => allowedObjectTypes(object)))];
|
|
12
15
|
const commonKeys = allKeys.filter((key) => allowedObjectsList.every((object) => key in object));
|
|
13
16
|
const mergedEntries = commonKeys.map((key) => {
|
|
14
17
|
const loadScores = allowedObjectsList.map((object) => getObject(object, key).is_loadable);
|
|
@@ -33,7 +36,7 @@ function resolveAllowedObjects(filenames, allowedObjectsList) {
|
|
|
33
36
|
};
|
|
34
37
|
}
|
|
35
38
|
function sortCandidates(objectMap) {
|
|
36
|
-
return
|
|
39
|
+
return allowedObjectTypes(objectMap).filter((key) => getObject(objectMap, key).is_loadable > 0).toSorted((keyA, keyB) => {
|
|
37
40
|
const objectA = getObject(objectMap, keyA);
|
|
38
41
|
const objectB = getObject(objectMap, keyB);
|
|
39
42
|
if (objectA.is_loadable !== objectB.is_loadable) return objectB.is_loadable - objectA.is_loadable;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
// oxlint-disable import/max-dependencies -- one icon import per geode object type
|
|
2
|
+
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
3
|
+
|
|
1
4
|
import BRep from "@ogw_front/assets/img/geode_objects/BRep.svg";
|
|
2
5
|
import CrossSection from "@ogw_front/assets/img/geode_objects/CrossSection.svg";
|
|
3
6
|
import EdgedCurve2D from "@ogw_front/assets/img/geode_objects/EdgedCurve2D.svg";
|
|
4
7
|
import EdgedCurve3D from "@ogw_front/assets/img/geode_objects/EdgedCurve3D.svg";
|
|
5
8
|
import Graph from "@ogw_front/assets/img/geode_objects/Graph.svg";
|
|
9
|
+
import HorizonStack3D from "@ogw_front/assets/img/geode_objects/HorizonStack3D.svg";
|
|
6
10
|
import HybridSolid3D from "@ogw_front/assets/img/geode_objects/HybridSolid3D.svg";
|
|
7
11
|
import ImplicitCrossSection from "@ogw_front/assets/img/geode_objects/ImplicitCrossSection.svg";
|
|
8
12
|
import ImplicitStructuralModel from "@ogw_front/assets/img/geode_objects/ImplicitStructuralModel.svg";
|
|
@@ -13,7 +17,6 @@ import PointSet3D from "@ogw_front/assets/img/geode_objects/PointSet3D.svg";
|
|
|
13
17
|
import PolygonalSurface2D from "@ogw_front/assets/img/geode_objects/PolygonalSurface2D.svg";
|
|
14
18
|
import PolygonalSurface3D from "@ogw_front/assets/img/geode_objects/PolygonalSurface3D.svg";
|
|
15
19
|
import PolyhedralSolid3D from "@ogw_front/assets/img/geode_objects/PolyhedralSolid3D.svg";
|
|
16
|
-
// oxlint-disable-next-line import/max-dependencies -- one icon import per geode object.
|
|
17
20
|
import RasterImage2D from "@ogw_front/assets/img/geode_objects/RasterImage2D.svg";
|
|
18
21
|
import RasterImage3D from "@ogw_front/assets/img/geode_objects/RasterImage3D.svg";
|
|
19
22
|
import RegularGrid2D from "@ogw_front/assets/img/geode_objects/RegularGrid2D.svg";
|
|
@@ -25,112 +28,38 @@ import TriangulatedSurface2D from "@ogw_front/assets/img/geode_objects/Triangula
|
|
|
25
28
|
import TriangulatedSurface3D from "@ogw_front/assets/img/geode_objects/TriangulatedSurface3D.svg";
|
|
26
29
|
import VertexSet from "@ogw_front/assets/img/geode_objects/VertexSet.svg";
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
image: HybridSolid3D,
|
|
57
|
-
},
|
|
58
|
-
ImplicitCrossSection: {
|
|
59
|
-
tooltip: "ImplicitCrossSection",
|
|
60
|
-
image: ImplicitCrossSection,
|
|
61
|
-
},
|
|
62
|
-
ImplicitStructuralModel: {
|
|
63
|
-
tooltip: "ImplicitStructuralModel",
|
|
64
|
-
image: ImplicitStructuralModel,
|
|
65
|
-
},
|
|
66
|
-
LightRegularGrid2D: {
|
|
67
|
-
tooltip: "LightRegularGrid2D",
|
|
68
|
-
image: LightRegularGrid2D,
|
|
69
|
-
},
|
|
70
|
-
LightRegularGrid3D: {
|
|
71
|
-
tooltip: "LightRegularGrid3D",
|
|
72
|
-
image: LightRegularGrid3D,
|
|
73
|
-
},
|
|
74
|
-
PointSet2D: {
|
|
75
|
-
tooltip: "PointSet2D",
|
|
76
|
-
image: PointSet2D,
|
|
77
|
-
},
|
|
78
|
-
PointSet3D: {
|
|
79
|
-
tooltip: "PointSet3D",
|
|
80
|
-
image: PointSet3D,
|
|
81
|
-
},
|
|
82
|
-
PolygonalSurface2D: {
|
|
83
|
-
tooltip: "PolygonalSurface2D",
|
|
84
|
-
image: PolygonalSurface2D,
|
|
85
|
-
},
|
|
86
|
-
PolygonalSurface3D: {
|
|
87
|
-
tooltip: "PolygonalSurface3D",
|
|
88
|
-
image: PolygonalSurface3D,
|
|
89
|
-
},
|
|
90
|
-
PolyhedralSolid3D: {
|
|
91
|
-
tooltip: "PolyhedralSolid3D",
|
|
92
|
-
image: PolyhedralSolid3D,
|
|
93
|
-
},
|
|
94
|
-
RasterImage2D: {
|
|
95
|
-
tooltip: "RasterImage2D",
|
|
96
|
-
image: RasterImage2D,
|
|
97
|
-
},
|
|
98
|
-
RasterImage3D: {
|
|
99
|
-
tooltip: "RasterImage3D",
|
|
100
|
-
image: RasterImage3D,
|
|
101
|
-
},
|
|
102
|
-
RegularGrid2D: {
|
|
103
|
-
tooltip: "RegularGrid2D",
|
|
104
|
-
image: RegularGrid2D,
|
|
105
|
-
},
|
|
106
|
-
RegularGrid3D: {
|
|
107
|
-
tooltip: "RegularGrid3D",
|
|
108
|
-
image: RegularGrid3D,
|
|
109
|
-
},
|
|
110
|
-
Section: {
|
|
111
|
-
tooltip: "Section",
|
|
112
|
-
image: Section,
|
|
113
|
-
},
|
|
114
|
-
StructuralModel: {
|
|
115
|
-
tooltip: "StructuralModel",
|
|
116
|
-
image: StructuralModel,
|
|
117
|
-
},
|
|
118
|
-
TetrahedralSolid3D: {
|
|
119
|
-
tooltip: "TetrahedralSolid3D",
|
|
120
|
-
image: TetrahedralSolid3D,
|
|
121
|
-
},
|
|
122
|
-
TriangulatedSurface2D: {
|
|
123
|
-
tooltip: "TriangulatedSurface2D",
|
|
124
|
-
image: TriangulatedSurface2D,
|
|
125
|
-
},
|
|
126
|
-
TriangulatedSurface3D: {
|
|
127
|
-
tooltip: "TriangulatedSurface3D",
|
|
128
|
-
image: TriangulatedSurface3D,
|
|
129
|
-
},
|
|
130
|
-
VertexSet: {
|
|
131
|
-
tooltip: "VertexSet",
|
|
132
|
-
image: VertexSet,
|
|
133
|
-
},
|
|
31
|
+
// Icon of each geode object type: every type of data_types.py must have one
|
|
32
|
+
const geodeObjectImages: Record<GeodeObjectType, string> = {
|
|
33
|
+
BRep,
|
|
34
|
+
CrossSection,
|
|
35
|
+
EdgedCurve2D,
|
|
36
|
+
EdgedCurve3D,
|
|
37
|
+
Graph,
|
|
38
|
+
HorizonStack3D,
|
|
39
|
+
HybridSolid3D,
|
|
40
|
+
ImplicitCrossSection,
|
|
41
|
+
ImplicitStructuralModel,
|
|
42
|
+
LightRegularGrid2D,
|
|
43
|
+
LightRegularGrid3D,
|
|
44
|
+
PointSet2D,
|
|
45
|
+
PointSet3D,
|
|
46
|
+
PolygonalSurface2D,
|
|
47
|
+
PolygonalSurface3D,
|
|
48
|
+
PolyhedralSolid3D,
|
|
49
|
+
RasterImage2D,
|
|
50
|
+
RasterImage3D,
|
|
51
|
+
RegularGrid2D,
|
|
52
|
+
RegularGrid3D,
|
|
53
|
+
Section,
|
|
54
|
+
StructuralModel,
|
|
55
|
+
TetrahedralSolid3D,
|
|
56
|
+
TriangulatedSurface2D,
|
|
57
|
+
TriangulatedSurface3D,
|
|
58
|
+
VertexSet,
|
|
134
59
|
};
|
|
135
60
|
|
|
136
|
-
|
|
61
|
+
function geodeObjectImage(geodeObjectType: GeodeObjectType): string {
|
|
62
|
+
return geodeObjectImages[geodeObjectType];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { geodeObjectImage };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="18.141853mm" height="18.141851mm" viewBox="0 0 64.282157 64.282151" version="1.1">
|
|
3
|
+
<g style="fill:none;stroke:#000000;stroke-width:4.24248075;stroke-linecap:round;stroke-linejoin:round">
|
|
4
|
+
<path d="M 15,6 H 49 V 58 H 15 Z" />
|
|
5
|
+
<path d="M 15.00,17.00 C 25.20,12.00 30.30,22.00 38.80,17.00 S 46.28,14.50 49.00,17.00" />
|
|
6
|
+
<path d="M 15,28 H 49" />
|
|
7
|
+
<path d="M 15.00,39.50 C 25.20,34.50 30.30,44.50 38.80,39.50 S 46.28,37.00 49.00,39.50" />
|
|
8
|
+
<path d="M 15,49 H 49" />
|
|
9
|
+
</g>
|
|
10
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
3
|
-
import type { GeodeObjectType } from "@
|
|
2
|
+
import type { CRS } from "@geode/opengeodeweb-back/schema_types";
|
|
3
|
+
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
4
4
|
import { useCrsStore } from "@ogw_front/stores/crs";
|
|
5
5
|
|
|
6
6
|
interface Props {
|
|
@@ -10,23 +10,23 @@ interface Props {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
const { geodeObjectType, compact = false } = defineProps<Props>();
|
|
13
|
-
const selectedCrs = defineModel<
|
|
13
|
+
const selectedCrs = defineModel<CRS | undefined>();
|
|
14
14
|
|
|
15
15
|
const search = ref<string>("");
|
|
16
16
|
const data_table_loading = ref<boolean>(false);
|
|
17
17
|
// Thousands of rows that are never mutated: no deep reactivity
|
|
18
|
-
const crs_list = shallowRef<
|
|
18
|
+
const crs_list = shallowRef<CRS[]>([]);
|
|
19
19
|
// Keys of the selected rows: the item-value of the table, "AUTHORITY:CODE"
|
|
20
20
|
const selected_crs = ref<string[]>([]);
|
|
21
21
|
const toggle_loading = useToggle(data_table_loading);
|
|
22
22
|
const crsStore = useCrsStore();
|
|
23
23
|
|
|
24
24
|
// Codes are only unique within an authority (e.g. EPSG:4812 and ESRI:4812)
|
|
25
|
-
function crs_key(crs:
|
|
25
|
+
function crs_key(crs: CRS): string {
|
|
26
26
|
return `${crs.authority}:${crs.code}`;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
function get_selected_crs(key: string | undefined):
|
|
29
|
+
function get_selected_crs(key: string | undefined): CRS | undefined {
|
|
30
30
|
return crs_list.value.find((crs) => crs_key(crs) === key);
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -2,7 +2,7 @@
|
|
|
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 "@
|
|
5
|
+
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
6
6
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
7
7
|
|
|
8
8
|
const schema = schemas.opengeodeweb_back.geode_objects_and_output_extensions;
|
|
@@ -20,7 +20,9 @@ interface Props {
|
|
|
20
20
|
const { geodeObjectType, filenames } = defineProps<Props>();
|
|
21
21
|
type OutputExtensions = Record<string, { is_saveable: boolean }>;
|
|
22
22
|
|
|
23
|
-
const geode_objects_and_output_extensions = ref<Record<GeodeObjectType, OutputExtensions
|
|
23
|
+
const geode_objects_and_output_extensions = ref<Partial<Record<GeodeObjectType, OutputExtensions>>>(
|
|
24
|
+
{},
|
|
25
|
+
);
|
|
24
26
|
const loading = ref<boolean>(false);
|
|
25
27
|
|
|
26
28
|
const toggle_loading = useToggle(loading);
|
|
@@ -29,25 +31,28 @@ async function get_output_file_extensions(): Promise<void> {
|
|
|
29
31
|
toggle_loading();
|
|
30
32
|
geode_objects_and_output_extensions.value = {};
|
|
31
33
|
const backStore = useBackStore();
|
|
32
|
-
const values: Record<GeodeObjectType, Record<string, boolean
|
|
33
|
-
filenames.map(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const values: Partial<Record<GeodeObjectType, Record<string, boolean>>>[] = await Promise.all(
|
|
35
|
+
filenames.map(
|
|
36
|
+
async (filename): Promise<Partial<Record<GeodeObjectType, Record<string, boolean>>>> => {
|
|
37
|
+
const params = { geode_object_type: geodeObjectType, filename };
|
|
38
|
+
const response = await backStore.request({ schema, params });
|
|
39
|
+
return response.geode_objects_and_output_extensions;
|
|
40
|
+
},
|
|
41
|
+
),
|
|
38
42
|
);
|
|
39
|
-
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))];
|
|
43
|
+
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value) as GeodeObjectType[]))];
|
|
40
44
|
const common_keys = all_keys.filter((i) => !values.some((j) => !Object.keys(j).includes(i)));
|
|
41
|
-
const final_object: Record<GeodeObjectType, OutputExtensions
|
|
45
|
+
const final_object: Partial<Record<GeodeObjectType, OutputExtensions>> = {};
|
|
42
46
|
for (const key of common_keys) {
|
|
43
|
-
|
|
47
|
+
const output_extensions: OutputExtensions = {};
|
|
48
|
+
final_object[key] = output_extensions;
|
|
44
49
|
for (const value of values) {
|
|
45
50
|
const extensions = value[key];
|
|
46
51
|
if (!extensions) {
|
|
47
52
|
continue;
|
|
48
53
|
}
|
|
49
54
|
for (const [extension, is_saveable] of Object.entries(extensions)) {
|
|
50
|
-
|
|
55
|
+
output_extensions[extension] = { is_saveable };
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
58
|
}
|
|
@@ -56,7 +61,7 @@ async function get_output_file_extensions(): Promise<void> {
|
|
|
56
61
|
}
|
|
57
62
|
|
|
58
63
|
function update_values(output_geode_object: GeodeObjectType, output_extension: string): void {
|
|
59
|
-
if (
|
|
64
|
+
if (output_extension !== "") {
|
|
60
65
|
emit("update_values", {
|
|
61
66
|
output_geode_object,
|
|
62
67
|
output_extension,
|
|
@@ -100,7 +105,9 @@ await get_output_file_extensions();
|
|
|
100
105
|
class="card ma-2"
|
|
101
106
|
:color="extension.is_saveable ? 'primary' : 'grey'"
|
|
102
107
|
hover
|
|
103
|
-
@click="
|
|
108
|
+
@click="
|
|
109
|
+
update_values(output_geode_object as GeodeObjectType, output_extension)
|
|
110
|
+
"
|
|
104
111
|
:disabled="!extension.is_saveable"
|
|
105
112
|
>
|
|
106
113
|
<v-card-title align="center">
|
|
@@ -5,7 +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 "@
|
|
8
|
+
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
9
9
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
10
10
|
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
11
11
|
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
resolveAllowedObjectsPerFile,
|
|
8
8
|
} from "@ogw_shared/utils/response_handlers/load.js";
|
|
9
9
|
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
10
|
-
import type { GeodeObjectType } from "@
|
|
11
|
-
import {
|
|
10
|
+
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
11
|
+
import { geodeObjectImage } from "@ogw_front/assets/geode_objects";
|
|
12
12
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
13
13
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
14
14
|
|
|
@@ -94,15 +94,8 @@ function groupPendingFiles(pending: readonly FileAllowedObjects[]): PendingGroup
|
|
|
94
94
|
return [...groups.values()];
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
// The geode_objects lookup is fixed and keyed by known object type names; a missing entry only happens if the backend reports a type this table doesn't know about.
|
|
98
97
|
function geodeObjectTooltip(key: string, isLoadable: boolean): string {
|
|
99
|
-
return isLoadable
|
|
100
|
-
? (geode_objects[key]?.tooltip ?? key)
|
|
101
|
-
: `Data not loadable with this class (${key})`;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function geodeObjectImage(key: string): string | undefined {
|
|
105
|
-
return geode_objects[key]?.image;
|
|
98
|
+
return isLoadable ? key : `Data not loadable with this class (${key})`;
|
|
106
99
|
}
|
|
107
100
|
|
|
108
101
|
function showCommonGeodeObjects(
|
|
@@ -229,7 +222,7 @@ await getAllowedGeodeObjects();
|
|
|
229
222
|
Choose the data type for: {{ pendingFilenames.join(", ") }}
|
|
230
223
|
</v-col>
|
|
231
224
|
<v-col v-for="(value, key) in allowedGeodeObjects" :key="key" cols="3" md="4">
|
|
232
|
-
<v-tooltip :text="geodeObjectTooltip(key, Boolean(value
|
|
225
|
+
<v-tooltip :text="geodeObjectTooltip(key, Boolean(value?.is_loadable))" location="bottom">
|
|
233
226
|
<template v-slot:activator="{ props }">
|
|
234
227
|
<span v-bind="props">
|
|
235
228
|
<v-card
|
|
@@ -238,13 +231,13 @@ await getAllowedGeodeObjects();
|
|
|
238
231
|
hover
|
|
239
232
|
rounded
|
|
240
233
|
@click="setGeodeObject(key)"
|
|
241
|
-
:disabled="!value
|
|
242
|
-
:elevation="value
|
|
234
|
+
:disabled="!value?.is_loadable"
|
|
235
|
+
:elevation="value?.is_loadable ? 5 : 3"
|
|
243
236
|
>
|
|
244
237
|
<v-img
|
|
245
238
|
:src="geodeObjectImage(key)"
|
|
246
239
|
cover
|
|
247
|
-
:class="!value
|
|
240
|
+
:class="!value?.is_loadable ? 'disabled' : undefined"
|
|
248
241
|
/>
|
|
249
242
|
</v-card>
|
|
250
243
|
</span>
|
|
@@ -1,7 +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 "@
|
|
4
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
5
5
|
import ThresholdCard from "@ogw_front/components/ThresholdCard.vue";
|
|
6
6
|
import ToolPanel from "@ogw_front/components/ToolPanel.vue";
|
|
7
7
|
import { fetchSources } from "@ogw_front/utils/threshold_sources";
|
|
@@ -1,12 +1,9 @@
|
|
|
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
|
+
import type { DataIdentified, GeodeObjectTyped } from "@ogw_front/types/identifiers";
|
|
9
5
|
import FetchingData from "@ogw_front/components/FetchingData.vue";
|
|
6
|
+
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
10
7
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
11
8
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
12
9
|
|
|
@@ -114,7 +114,7 @@ useEventListener(globalThis, "mouseup", (event: MouseEvent) => {
|
|
|
114
114
|
|
|
115
115
|
const menu_items = shallowRef<Component[]>([]);
|
|
116
116
|
watch(
|
|
117
|
-
() => [meta_data.value.viewer_object_type, meta_data.value.geode_object_type],
|
|
117
|
+
() => [meta_data.value.viewer_object_type, meta_data.value.geode_object_type] as const,
|
|
118
118
|
([viewer_object_type, geode_object_type]) => {
|
|
119
119
|
menu_items.value = menuStore.getMenuItems(viewer_object_type, geode_object_type);
|
|
120
120
|
},
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type {
|
|
3
3
|
AttributeColorMap,
|
|
4
|
-
AttributeItem,
|
|
5
|
-
AttributeName,
|
|
6
4
|
AttributeRange,
|
|
7
5
|
AttributeTimeStep,
|
|
8
6
|
} from "@ogw_front/types/attribute";
|
|
9
|
-
import type {
|
|
7
|
+
import type {
|
|
8
|
+
AttributeItem,
|
|
9
|
+
AttributeName,
|
|
10
|
+
ColorRGBA,
|
|
11
|
+
Opacity,
|
|
12
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
10
13
|
import {
|
|
11
14
|
type RangesPerData,
|
|
12
15
|
applyRangesPerData,
|
|
13
16
|
useBatchStyle,
|
|
14
17
|
} from "@ogw_front/composables/batch_style";
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
18
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
19
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
17
20
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
18
21
|
import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
|
|
19
22
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -38,9 +41,9 @@ const coloring_style_key = computed<string>({
|
|
|
38
41
|
hybridViewerStore.remoteRender();
|
|
39
42
|
},
|
|
40
43
|
});
|
|
41
|
-
const color = useBatchStyleModel<
|
|
44
|
+
const color = useBatchStyleModel<ColorRGBA>(
|
|
42
45
|
() => dataId,
|
|
43
|
-
(meshId) => dataStyleStore.meshEdgesColor(meshId) as
|
|
46
|
+
(meshId) => dataStyleStore.meshEdgesColor(meshId) as ColorRGBA | undefined,
|
|
44
47
|
(meshId, value) => dataStyleStore.setMeshEdgesColor(meshId, value),
|
|
45
48
|
);
|
|
46
49
|
const opacity = useBatchStyleModel<Opacity>(
|
|
@@ -104,7 +107,7 @@ const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
|
104
107
|
hybridViewerStore.remoteRender();
|
|
105
108
|
},
|
|
106
109
|
});
|
|
107
|
-
const vertex_attribute_no_data_color = computed<
|
|
110
|
+
const vertex_attribute_no_data_color = computed<ColorRGBA>({
|
|
108
111
|
get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(dataId),
|
|
109
112
|
set: async (newValue) => {
|
|
110
113
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -169,7 +172,7 @@ const edge_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
|
169
172
|
hybridViewerStore.remoteRender();
|
|
170
173
|
},
|
|
171
174
|
});
|
|
172
|
-
const edge_attribute_no_data_color = computed<
|
|
175
|
+
const edge_attribute_no_data_color = computed<ColorRGBA>({
|
|
173
176
|
get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(dataId),
|
|
174
177
|
set: async (newValue) => {
|
|
175
178
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
+
import type { EdgeWidth, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
2
3
|
import ViewerContextMenuItem, {
|
|
3
4
|
type ItemProps,
|
|
4
5
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
5
|
-
import type { Visibility, Width } from "@ogw_front/types/style";
|
|
6
6
|
import EdgedCurveEdges from "@ogw_front/assets/viewer_svgs/edged_curve_edges.svg";
|
|
7
7
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
8
8
|
import ViewerEdgedCurveSpecificEdgesColoring from "@ogw_front/components/Viewer/EdgedCurve/SpecificEdgesColoring.vue";
|
|
@@ -33,7 +33,7 @@ const visibility = computed<Visibility>({
|
|
|
33
33
|
hybridViewerStore.remoteRender();
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
|
-
const width = computed<
|
|
36
|
+
const width = computed<EdgeWidth>({
|
|
37
37
|
get: () => dataStyleStore.meshEdgesWidth(dataId.value),
|
|
38
38
|
set: async (newValue) => {
|
|
39
39
|
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type {
|
|
3
3
|
AttributeColorMap,
|
|
4
|
-
AttributeItem,
|
|
5
|
-
AttributeName,
|
|
6
4
|
AttributeRange,
|
|
7
5
|
AttributeTimeStep,
|
|
8
6
|
} from "@ogw_front/types/attribute";
|
|
9
|
-
import type {
|
|
7
|
+
import type {
|
|
8
|
+
AttributeItem,
|
|
9
|
+
AttributeName,
|
|
10
|
+
ColorRGBA,
|
|
11
|
+
Opacity,
|
|
12
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
10
13
|
import {
|
|
11
14
|
type RangesPerData,
|
|
12
15
|
applyRangesPerData,
|
|
13
16
|
useBatchStyle,
|
|
14
17
|
} from "@ogw_front/composables/batch_style";
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
18
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
19
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
17
20
|
import type { Texture } from "@ogw_front/types/texture";
|
|
18
21
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
19
22
|
import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
|
|
@@ -39,9 +42,9 @@ const coloring_style_key = computed<string>({
|
|
|
39
42
|
hybridViewerStore.remoteRender();
|
|
40
43
|
},
|
|
41
44
|
});
|
|
42
|
-
const color = useBatchStyleModel<
|
|
45
|
+
const color = useBatchStyleModel<ColorRGBA>(
|
|
43
46
|
() => dataId,
|
|
44
|
-
(meshId) => dataStyleStore.meshCellsColor(meshId) as
|
|
47
|
+
(meshId) => dataStyleStore.meshCellsColor(meshId) as ColorRGBA | undefined,
|
|
45
48
|
(meshId, value) => dataStyleStore.setMeshCellsColor(meshId, value),
|
|
46
49
|
);
|
|
47
50
|
const opacity = useBatchStyleModel<Opacity>(
|
|
@@ -111,7 +114,7 @@ const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
|
111
114
|
hybridViewerStore.remoteRender();
|
|
112
115
|
},
|
|
113
116
|
});
|
|
114
|
-
const vertex_attribute_no_data_color = computed<
|
|
117
|
+
const vertex_attribute_no_data_color = computed<ColorRGBA>({
|
|
115
118
|
get: () => dataStyleStore.meshCellsVertexAttributeNoDataColor(dataId),
|
|
116
119
|
set: async (newValue) => {
|
|
117
120
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -176,7 +179,7 @@ const cell_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
|
176
179
|
hybridViewerStore.remoteRender();
|
|
177
180
|
},
|
|
178
181
|
});
|
|
179
|
-
const cell_attribute_no_data_color = computed<
|
|
182
|
+
const cell_attribute_no_data_color = computed<ColorRGBA>({
|
|
180
183
|
get: () => dataStyleStore.meshCellsCellAttributeNoDataColor(dataId),
|
|
181
184
|
set: async (newValue) => {
|
|
182
185
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -5,7 +5,7 @@ import ViewerContextMenuItem, {
|
|
|
5
5
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
6
6
|
import ViewerGenericMeshCellsColoring from "@ogw_front/components/Viewer/Generic/Mesh/CellsColoring.vue";
|
|
7
7
|
import ViewerOptionsVisibilitySwitch from "@ogw_front/components/Viewer/Options/VisibilitySwitch.vue";
|
|
8
|
-
import type { Visibility } from "@
|
|
8
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
9
9
|
import { useBatchStyle } from "@ogw_front/composables/batch_style";
|
|
10
10
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
11
11
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import type {
|
|
3
3
|
AttributeColorMap,
|
|
4
|
-
AttributeItem,
|
|
5
|
-
AttributeName,
|
|
6
4
|
AttributeRange,
|
|
7
5
|
AttributeTimeStep,
|
|
8
6
|
} from "@ogw_front/types/attribute";
|
|
9
|
-
import type {
|
|
7
|
+
import type {
|
|
8
|
+
AttributeItem,
|
|
9
|
+
AttributeName,
|
|
10
|
+
ColorRGBA,
|
|
11
|
+
Opacity,
|
|
12
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
10
13
|
import {
|
|
11
14
|
type RangesPerData,
|
|
12
15
|
applyRangesPerData,
|
|
13
16
|
useBatchStyle,
|
|
14
17
|
} from "@ogw_front/composables/batch_style";
|
|
15
|
-
import type {
|
|
16
|
-
import type {
|
|
18
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
19
|
+
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
17
20
|
import ViewerOptionsColoringTypeSelector from "@ogw_front/components/Viewer/Options/ColoringTypeSelector.vue";
|
|
18
21
|
import { useBatchStyleModel } from "@ogw_front/composables/batch_style_model";
|
|
19
22
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
@@ -39,9 +42,9 @@ const coloring_style_key = computed<string>({
|
|
|
39
42
|
hybridViewerStore.remoteRender();
|
|
40
43
|
},
|
|
41
44
|
});
|
|
42
|
-
const color = useBatchStyleModel<
|
|
45
|
+
const color = useBatchStyleModel<ColorRGBA>(
|
|
43
46
|
() => dataId,
|
|
44
|
-
(meshId) => dataStyleStore.meshEdgesColor(meshId) as
|
|
47
|
+
(meshId) => dataStyleStore.meshEdgesColor(meshId) as ColorRGBA | undefined,
|
|
45
48
|
(meshId, value) => dataStyleStore.setMeshEdgesColor(meshId, value),
|
|
46
49
|
);
|
|
47
50
|
const opacity = useBatchStyleModel<Opacity>(
|
|
@@ -105,7 +108,7 @@ const vertex_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
|
105
108
|
hybridViewerStore.remoteRender();
|
|
106
109
|
},
|
|
107
110
|
});
|
|
108
|
-
const vertex_attribute_no_data_color = computed<
|
|
111
|
+
const vertex_attribute_no_data_color = computed<ColorRGBA>({
|
|
109
112
|
get: () => dataStyleStore.meshEdgesVertexAttributeNoDataColor(dataId),
|
|
110
113
|
set: async (newValue) => {
|
|
111
114
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -170,7 +173,7 @@ const edge_attribute_color_map = computed<AttributeColorMap | undefined>({
|
|
|
170
173
|
hybridViewerStore.remoteRender();
|
|
171
174
|
},
|
|
172
175
|
});
|
|
173
|
-
const edge_attribute_no_data_color = computed<
|
|
176
|
+
const edge_attribute_no_data_color = computed<ColorRGBA>({
|
|
174
177
|
get: () => dataStyleStore.meshEdgesEdgeAttributeNoDataColor(dataId),
|
|
175
178
|
set: async (newValue) => {
|
|
176
179
|
await applyBatchStyle(dataId, (meshId: MeshId) =>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type {
|
|
2
|
+
import type { EdgeWidth, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
import ViewerContextMenuItem, {
|
|
4
4
|
type ItemProps,
|
|
5
5
|
} from "@ogw_front/components/Viewer/ContextMenu/ContextMenuItem.vue";
|
|
@@ -40,7 +40,7 @@ const visibility = computed<Visibility>({
|
|
|
40
40
|
hybridViewerStore.remoteRender();
|
|
41
41
|
},
|
|
42
42
|
});
|
|
43
|
-
const
|
|
43
|
+
const width = computed<EdgeWidth>({
|
|
44
44
|
get: () => dataStyleStore.meshEdgesWidth(dataId.value),
|
|
45
45
|
set: async (newValue) => {
|
|
46
46
|
await applyBatchStyle(dataId.value, (meshId: MeshId) =>
|
|
@@ -70,7 +70,7 @@ const size = computed<Size>({
|
|
|
70
70
|
</v-row>
|
|
71
71
|
<template v-if="visibility">
|
|
72
72
|
<v-divider class="my-2" />
|
|
73
|
-
<ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="
|
|
73
|
+
<ViewerOptionsWidthSlider data-testid="meshEdgesWidthSlider" v-model="width" />
|
|
74
74
|
<ViewerGenericMeshEdgesColoring :data-id="dataId" :capabilities="capabilities" />
|
|
75
75
|
</template>
|
|
76
76
|
</template>
|