@geode/opengeodeweb-front 10.44.0 → 10.44.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 +1 -1
- package/shared/utils/fetch_raw.ts +7 -8
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
// oxlint-disable eslint/max-lines
|
|
2
|
+
import type {
|
|
3
|
+
AttributeColorMap,
|
|
4
|
+
AttributeItem,
|
|
5
|
+
AttributeName,
|
|
6
|
+
AttributeRange,
|
|
7
|
+
AttributeRangeMaximum,
|
|
8
|
+
AttributeRangeMinimum,
|
|
9
|
+
} from "@ogw_front/types/attribute";
|
|
10
|
+
import type {
|
|
11
|
+
AttributeState,
|
|
12
|
+
AttributeStoredConfig,
|
|
13
|
+
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
2
14
|
import {
|
|
3
|
-
type AttributeState,
|
|
4
|
-
type AttributeStoredConfig,
|
|
5
|
-
groupBy,
|
|
6
|
-
} from "@ogw_internal/stores/data_style/model/component_style";
|
|
7
|
-
import {
|
|
8
|
-
DEFAULT_NO_DATA_COLOR,
|
|
9
15
|
POINTS_DEFAULT_COLOR,
|
|
10
16
|
POINTS_DEFAULT_SIZE,
|
|
11
17
|
POINTS_DEFAULT_VISIBILITY,
|
|
12
18
|
type RGBAColor,
|
|
13
19
|
} from "@ogw_front/utils/default_styles/constants";
|
|
20
|
+
import type { Size, Visibility } from "@ogw_front/types/style";
|
|
21
|
+
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
22
|
+
import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
|
|
14
23
|
import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap";
|
|
24
|
+
import { groupBy } from "@ogw_internal/stores/data_style/model/component_style";
|
|
15
25
|
import merge from "lodash/merge";
|
|
16
26
|
import { useAttributeTimeStepStyle } from "@ogw_internal/stores/data_style/time_step";
|
|
17
27
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
@@ -40,8 +50,8 @@ type PointsRequestSchema =
|
|
|
40
50
|
| PointsSchemas["attribute"]["vertex"]["attribute"];
|
|
41
51
|
|
|
42
52
|
interface PointsStyle {
|
|
43
|
-
visibility?:
|
|
44
|
-
size?:
|
|
53
|
+
visibility?: Visibility;
|
|
54
|
+
size?: Size;
|
|
45
55
|
coloring?: {
|
|
46
56
|
active?: string;
|
|
47
57
|
constant?: RGBAColor;
|
|
@@ -60,7 +70,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
60
70
|
const schemas = modelSchemas[COMPONENT_TYPE_KEYS[type]].points;
|
|
61
71
|
|
|
62
72
|
// Without an explicit points style, components follow the model points style
|
|
63
|
-
function pointsStyle(modelId:
|
|
73
|
+
function pointsStyle(modelId: ModelId, componentId?: string): PointsStyle {
|
|
64
74
|
// oxlint-disable-next-line no-unsafe-type-assertion -- points shape is defined by the data style schema.
|
|
65
75
|
const modelPoints = (dataStyleState.getStyle(modelId).points ?? {}) as PointsStyle;
|
|
66
76
|
// oxlint-disable-next-line no-unsafe-type-assertion -- points shape is defined by the data style schema.
|
|
@@ -85,73 +95,71 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
85
95
|
);
|
|
86
96
|
}
|
|
87
97
|
|
|
88
|
-
function vertexAttribute(modelId:
|
|
98
|
+
function vertexAttribute(modelId: ModelId, componentId?: string): AttributeState {
|
|
89
99
|
return pointsStyle(modelId, componentId).coloring?.vertex ?? {};
|
|
90
100
|
}
|
|
91
101
|
|
|
92
|
-
function pointsVisibility(modelId:
|
|
102
|
+
function pointsVisibility(modelId: ModelId, componentId?: string): Visibility {
|
|
93
103
|
return pointsStyle(modelId, componentId).visibility ?? POINTS_DEFAULT_VISIBILITY;
|
|
94
104
|
}
|
|
95
105
|
|
|
96
|
-
function pointsSize(modelId:
|
|
106
|
+
function pointsSize(modelId: ModelId, componentId?: string): Size {
|
|
97
107
|
return pointsStyle(modelId, componentId).size ?? POINTS_DEFAULT_SIZE;
|
|
98
108
|
}
|
|
99
109
|
|
|
100
|
-
function pointsColor(modelId:
|
|
110
|
+
function pointsColor(modelId: ModelId, componentId?: string): RGBAColor {
|
|
101
111
|
return pointsStyle(modelId, componentId).coloring?.constant ?? POINTS_DEFAULT_COLOR;
|
|
102
112
|
}
|
|
103
113
|
|
|
104
|
-
function activeColoring(modelId:
|
|
114
|
+
function activeColoring(modelId: ModelId, componentId?: string): string {
|
|
105
115
|
return pointsStyle(modelId, componentId).coloring?.active ?? "constant";
|
|
106
116
|
}
|
|
107
117
|
|
|
108
|
-
function vertexAttributeName(modelId:
|
|
118
|
+
function vertexAttributeName(modelId: ModelId, componentId?: string): AttributeName | undefined {
|
|
109
119
|
return vertexAttribute(modelId, componentId).name;
|
|
110
120
|
}
|
|
111
121
|
|
|
112
|
-
function lastItem(
|
|
122
|
+
function lastItem(
|
|
123
|
+
modelId: ModelId,
|
|
124
|
+
componentId: string | undefined,
|
|
125
|
+
name?: AttributeName,
|
|
126
|
+
): number {
|
|
113
127
|
const { storedConfigs } = vertexAttribute(modelId, componentId);
|
|
114
128
|
return name === undefined ? 0 : (storedConfigs?.[name]?.lastItem ?? 0);
|
|
115
129
|
}
|
|
116
130
|
|
|
117
|
-
function vertexAttributeItem(modelId:
|
|
131
|
+
function vertexAttributeItem(modelId: ModelId, componentId?: string): AttributeItem {
|
|
118
132
|
const { name, item } = vertexAttribute(modelId, componentId);
|
|
119
133
|
return item ?? lastItem(modelId, componentId, name);
|
|
120
134
|
}
|
|
121
135
|
|
|
122
|
-
function storedConfig(modelId:
|
|
136
|
+
function storedConfig(modelId: ModelId, componentId: string | undefined): AttributeStoredConfig {
|
|
123
137
|
const { name, storedConfigs } = vertexAttribute(modelId, componentId);
|
|
124
138
|
const item = vertexAttributeItem(modelId, componentId);
|
|
125
139
|
const config = name === undefined ? undefined : storedConfigs?.[name]?.[item];
|
|
126
140
|
// A stored config may be partial, missing fields fall back to the defaults
|
|
127
|
-
return {
|
|
128
|
-
minimum: undefined,
|
|
129
|
-
maximum: undefined,
|
|
130
|
-
colorMap: undefined,
|
|
131
|
-
no_data_color: DEFAULT_NO_DATA_COLOR,
|
|
132
|
-
...config,
|
|
133
|
-
};
|
|
141
|
+
return { ...defaultAttributeStoredConfig(), ...config };
|
|
134
142
|
}
|
|
135
143
|
|
|
136
|
-
function vertexAttributeRange(
|
|
137
|
-
modelId: string,
|
|
138
|
-
componentId?: string,
|
|
139
|
-
): [number | undefined, number | undefined] {
|
|
144
|
+
function vertexAttributeRange(modelId: ModelId, componentId?: string): AttributeRange {
|
|
140
145
|
const { minimum, maximum } = storedConfig(modelId, componentId);
|
|
141
146
|
return [minimum, maximum];
|
|
142
147
|
}
|
|
143
148
|
|
|
144
|
-
function vertexAttributeColorMap(
|
|
149
|
+
function vertexAttributeColorMap(
|
|
150
|
+
modelId: ModelId,
|
|
151
|
+
componentId?: string,
|
|
152
|
+
): AttributeColorMap | undefined {
|
|
145
153
|
return storedConfig(modelId, componentId).colorMap;
|
|
146
154
|
}
|
|
147
155
|
|
|
148
|
-
function vertexAttributeNoDataColor(modelId:
|
|
156
|
+
function vertexAttributeNoDataColor(modelId: ModelId, componentId?: string): RGBAColor {
|
|
149
157
|
return storedConfig(modelId, componentId).no_data_color;
|
|
150
158
|
}
|
|
151
159
|
|
|
152
160
|
// The type style is updated too when every component of the type is targeted
|
|
153
161
|
async function mutatePoints(
|
|
154
|
-
modelId:
|
|
162
|
+
modelId: ModelId,
|
|
155
163
|
componentIds: string[],
|
|
156
164
|
values: PointsStyle,
|
|
157
165
|
): Promise<void> {
|
|
@@ -166,7 +174,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
166
174
|
}
|
|
167
175
|
|
|
168
176
|
async function requestPoints(
|
|
169
|
-
modelId:
|
|
177
|
+
modelId: ModelId,
|
|
170
178
|
componentIds: string[],
|
|
171
179
|
schema: PointsRequestSchema,
|
|
172
180
|
values: Record<string, unknown> & { style: PointsStyle },
|
|
@@ -194,9 +202,9 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
194
202
|
}
|
|
195
203
|
|
|
196
204
|
async function setVisibility(
|
|
197
|
-
modelId:
|
|
205
|
+
modelId: ModelId,
|
|
198
206
|
componentIds: string[],
|
|
199
|
-
visibility:
|
|
207
|
+
visibility: Visibility,
|
|
200
208
|
): Promise<unknown> {
|
|
201
209
|
const result = await requestPoints(modelId, componentIds, schemas.visibility, {
|
|
202
210
|
visibility,
|
|
@@ -205,7 +213,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
205
213
|
return result;
|
|
206
214
|
}
|
|
207
215
|
|
|
208
|
-
async function setSize(modelId:
|
|
216
|
+
async function setSize(modelId: ModelId, componentIds: string[], size: Size): Promise<unknown> {
|
|
209
217
|
const result = await requestPoints(modelId, componentIds, schemas.size, {
|
|
210
218
|
size,
|
|
211
219
|
style: { size },
|
|
@@ -214,7 +222,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
214
222
|
}
|
|
215
223
|
|
|
216
224
|
async function setColor(
|
|
217
|
-
modelId:
|
|
225
|
+
modelId: ModelId,
|
|
218
226
|
componentIds: string[],
|
|
219
227
|
color: RGBAColor,
|
|
220
228
|
): Promise<unknown> {
|
|
@@ -225,7 +233,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
225
233
|
return result;
|
|
226
234
|
}
|
|
227
235
|
|
|
228
|
-
async function applyVertexAttribute(modelId:
|
|
236
|
+
async function applyVertexAttribute(modelId: ModelId, componentIds: string[]): Promise<unknown> {
|
|
229
237
|
const [referenceId] = componentIds;
|
|
230
238
|
const name = vertexAttributeName(modelId, referenceId);
|
|
231
239
|
const item = vertexAttributeItem(modelId, referenceId);
|
|
@@ -252,7 +260,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
252
260
|
}
|
|
253
261
|
|
|
254
262
|
async function mutateVertexAttribute(
|
|
255
|
-
modelId:
|
|
263
|
+
modelId: ModelId,
|
|
256
264
|
componentIds: string[],
|
|
257
265
|
values: AttributeState,
|
|
258
266
|
): Promise<void> {
|
|
@@ -260,7 +268,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
260
268
|
}
|
|
261
269
|
|
|
262
270
|
async function mutateStoredConfig(
|
|
263
|
-
modelId:
|
|
271
|
+
modelId: ModelId,
|
|
264
272
|
componentIds: string[],
|
|
265
273
|
config: Partial<AttributeStoredConfig>,
|
|
266
274
|
): Promise<void> {
|
|
@@ -273,7 +281,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
273
281
|
}
|
|
274
282
|
|
|
275
283
|
async function setActiveColoring(
|
|
276
|
-
modelId:
|
|
284
|
+
modelId: ModelId,
|
|
277
285
|
componentIds: string[],
|
|
278
286
|
activeColoringType: string,
|
|
279
287
|
): Promise<unknown> {
|
|
@@ -287,9 +295,9 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
287
295
|
}
|
|
288
296
|
|
|
289
297
|
async function setVertexAttributeName(
|
|
290
|
-
modelId:
|
|
298
|
+
modelId: ModelId,
|
|
291
299
|
componentIds: string[],
|
|
292
|
-
name:
|
|
300
|
+
name: AttributeName,
|
|
293
301
|
): Promise<unknown> {
|
|
294
302
|
const item = lastItem(modelId, componentIds[0], name);
|
|
295
303
|
await mutateVertexAttribute(modelId, componentIds, { name, item });
|
|
@@ -298,9 +306,9 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
298
306
|
}
|
|
299
307
|
|
|
300
308
|
async function setVertexAttributeItem(
|
|
301
|
-
modelId:
|
|
309
|
+
modelId: ModelId,
|
|
302
310
|
componentIds: string[],
|
|
303
|
-
item:
|
|
311
|
+
item: AttributeItem,
|
|
304
312
|
): Promise<unknown> {
|
|
305
313
|
await mutateVertexAttribute(modelId, componentIds, { item });
|
|
306
314
|
const result = await applyVertexAttribute(modelId, componentIds);
|
|
@@ -308,10 +316,10 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
308
316
|
}
|
|
309
317
|
|
|
310
318
|
async function setVertexAttributeRange(
|
|
311
|
-
modelId:
|
|
319
|
+
modelId: ModelId,
|
|
312
320
|
componentIds: string[],
|
|
313
|
-
minimum:
|
|
314
|
-
maximum:
|
|
321
|
+
minimum: AttributeRangeMinimum,
|
|
322
|
+
maximum: AttributeRangeMaximum,
|
|
315
323
|
): Promise<unknown> {
|
|
316
324
|
await mutateStoredConfig(modelId, componentIds, { minimum, maximum });
|
|
317
325
|
const result = await applyVertexAttribute(modelId, componentIds);
|
|
@@ -319,9 +327,9 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
319
327
|
}
|
|
320
328
|
|
|
321
329
|
async function setVertexAttributeColorMap(
|
|
322
|
-
modelId:
|
|
330
|
+
modelId: ModelId,
|
|
323
331
|
componentIds: string[],
|
|
324
|
-
colorMap:
|
|
332
|
+
colorMap: AttributeColorMap | undefined,
|
|
325
333
|
): Promise<unknown> {
|
|
326
334
|
await mutateStoredConfig(modelId, componentIds, { colorMap });
|
|
327
335
|
const result = await applyVertexAttribute(modelId, componentIds);
|
|
@@ -329,7 +337,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
329
337
|
}
|
|
330
338
|
|
|
331
339
|
async function setVertexAttributeNoDataColor(
|
|
332
|
-
modelId:
|
|
340
|
+
modelId: ModelId,
|
|
333
341
|
componentIds: string[],
|
|
334
342
|
no_data_color: RGBAColor,
|
|
335
343
|
): Promise<unknown> {
|
|
@@ -338,7 +346,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
338
346
|
return result;
|
|
339
347
|
}
|
|
340
348
|
|
|
341
|
-
async function styledComponentIds(modelId:
|
|
349
|
+
async function styledComponentIds(modelId: ModelId): Promise<string[]> {
|
|
342
350
|
const componentIds = await dataStore.getMeshComponentGeodeIds(modelId, type);
|
|
343
351
|
if (dataStyleState.getModelComponentTypeStyle(modelId, type).points !== undefined) {
|
|
344
352
|
return componentIds;
|
|
@@ -349,7 +357,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
349
357
|
}
|
|
350
358
|
|
|
351
359
|
// The model points routes override every component, so the explicit points styles follow
|
|
352
|
-
async function mutateStyledPoints(modelId:
|
|
360
|
+
async function mutateStyledPoints(modelId: ModelId, values: PointsStyle): Promise<void> {
|
|
353
361
|
const componentIds = await styledComponentIds(modelId);
|
|
354
362
|
if (componentIds.length > 0) {
|
|
355
363
|
await mutatePoints(modelId, componentIds, values);
|
|
@@ -357,7 +365,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
357
365
|
}
|
|
358
366
|
|
|
359
367
|
// Only components with an explicit points style are sent, the others follow the model points
|
|
360
|
-
async function applyPointsStyle(modelId:
|
|
368
|
+
async function applyPointsStyle(modelId: ModelId): Promise<void> {
|
|
361
369
|
const componentIds = await styledComponentIds(modelId);
|
|
362
370
|
function style(componentId?: string): PointsStyle {
|
|
363
371
|
return pointsStyle(modelId, componentId);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
// Local imports
|
|
2
|
+
import type { Size, Visibility } from "@ogw_front/types/style";
|
|
3
|
+
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
2
4
|
import { useModelPointsCommonStyle } from "./common";
|
|
3
5
|
import { useModelPointsSizeStyle } from "./size";
|
|
4
6
|
import { useModelPointsVisibilityStyle } from "./visibility";
|
|
5
7
|
import { whenDefined } from "@ogw_internal/stores/data_style/when_defined";
|
|
6
8
|
|
|
7
9
|
export function useModelPointsStyle(): {
|
|
8
|
-
applyModelPointsStyle: (
|
|
10
|
+
applyModelPointsStyle: (modelId: ModelId) => Promise<unknown[]>;
|
|
9
11
|
} & ReturnType<typeof useModelPointsCommonStyle> &
|
|
10
12
|
ReturnType<typeof useModelPointsVisibilityStyle> &
|
|
11
13
|
ReturnType<typeof useModelPointsSizeStyle> {
|
|
@@ -13,22 +15,25 @@ export function useModelPointsStyle(): {
|
|
|
13
15
|
const modelPointsVisibilityStyle = useModelPointsVisibilityStyle();
|
|
14
16
|
const modelPointsSizeStyle = useModelPointsSizeStyle();
|
|
15
17
|
|
|
16
|
-
async function applyModelPointsStyle(
|
|
17
|
-
const style = modelPointsCommonStyle.modelPointsStyle(
|
|
18
|
+
async function applyModelPointsStyle(modelId: ModelId): Promise<unknown[]> {
|
|
19
|
+
const style = modelPointsCommonStyle.modelPointsStyle(modelId);
|
|
18
20
|
const result = await Promise.all([
|
|
19
21
|
whenDefined(
|
|
20
22
|
// oxlint-disable-next-line no-unsafe-type-assertion -- points style values are dynamically typed at runtime.
|
|
21
|
-
style.visibility as
|
|
23
|
+
style.visibility as Visibility | undefined,
|
|
22
24
|
async (visibility) => {
|
|
23
|
-
const applied = await modelPointsVisibilityStyle.setModelPointsVisibility(
|
|
25
|
+
const applied = await modelPointsVisibilityStyle.setModelPointsVisibility(
|
|
26
|
+
modelId,
|
|
27
|
+
visibility,
|
|
28
|
+
);
|
|
24
29
|
return applied;
|
|
25
30
|
},
|
|
26
31
|
),
|
|
27
32
|
whenDefined(
|
|
28
33
|
// oxlint-disable-next-line no-unsafe-type-assertion -- points style values are dynamically typed at runtime.
|
|
29
|
-
style.size as
|
|
34
|
+
style.size as Size | undefined,
|
|
30
35
|
async (size) => {
|
|
31
|
-
const applied = await modelPointsSizeStyle.setModelPointsSize(
|
|
36
|
+
const applied = await modelPointsSizeStyle.setModelPointsSize(modelId, size);
|
|
32
37
|
return applied;
|
|
33
38
|
},
|
|
34
39
|
),
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
POINTS_COMPONENT_TYPES,
|
|
7
7
|
useModelComponentPointsStyle,
|
|
8
8
|
} from "@ogw_internal/stores/data_style/model/points/component";
|
|
9
|
+
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
10
|
+
import type { Size } from "@ogw_front/types/style";
|
|
9
11
|
import { useModelPointsCommonStyle } from "./common";
|
|
10
12
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
11
13
|
|
|
@@ -13,8 +15,8 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
13
15
|
const schema = viewer_schemas.opengeodeweb_viewer.model.points.size;
|
|
14
16
|
|
|
15
17
|
export function useModelPointsSizeStyle(): {
|
|
16
|
-
modelPointsSize: (
|
|
17
|
-
setModelPointsSize: (
|
|
18
|
+
modelPointsSize: (modelId: ModelId) => Size | undefined;
|
|
19
|
+
setModelPointsSize: (modelId: ModelId, size: Size) => Promise<unknown>;
|
|
18
20
|
} {
|
|
19
21
|
const viewerStore = useViewerStore();
|
|
20
22
|
const modelPointsCommonStyle = useModelPointsCommonStyle();
|
|
@@ -22,13 +24,13 @@ export function useModelPointsSizeStyle(): {
|
|
|
22
24
|
useModelComponentPointsStyle(type),
|
|
23
25
|
);
|
|
24
26
|
|
|
25
|
-
function modelPointsSize(
|
|
27
|
+
function modelPointsSize(modelId: ModelId): Size | undefined {
|
|
26
28
|
// oxlint-disable-next-line no-unsafe-type-assertion -- points style values are dynamically typed at runtime.
|
|
27
|
-
return modelPointsCommonStyle.modelPointsStyle(
|
|
29
|
+
return modelPointsCommonStyle.modelPointsStyle(modelId).size as Size | undefined;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
async function setModelPointsSize(
|
|
31
|
-
const params = { id, size };
|
|
32
|
+
async function setModelPointsSize(modelId: ModelId, size: Size): Promise<unknown> {
|
|
33
|
+
const params = { id: modelId, size };
|
|
32
34
|
const result = await viewerStore.request(
|
|
33
35
|
{
|
|
34
36
|
schema,
|
|
@@ -37,9 +39,9 @@ export function useModelPointsSizeStyle(): {
|
|
|
37
39
|
{
|
|
38
40
|
response_function: async () => {
|
|
39
41
|
const [mutateResult] = await Promise.all([
|
|
40
|
-
modelPointsCommonStyle.mutateModelPointsStyle(
|
|
42
|
+
modelPointsCommonStyle.mutateModelPointsStyle(modelId, { size }),
|
|
41
43
|
...componentsPointsStyles.map(async (pointsStyle) => {
|
|
42
|
-
await pointsStyle.mutateStyledPoints(
|
|
44
|
+
await pointsStyle.mutateStyledPoints(modelId, { size });
|
|
43
45
|
}),
|
|
44
46
|
]);
|
|
45
47
|
return mutateResult;
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
POINTS_COMPONENT_TYPES,
|
|
7
7
|
useModelComponentPointsStyle,
|
|
8
8
|
} from "@ogw_internal/stores/data_style/model/points/component";
|
|
9
|
+
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
10
|
+
import type { Visibility } from "@ogw_front/types/style";
|
|
9
11
|
import { useModelPointsCommonStyle } from "./common";
|
|
10
12
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
11
13
|
|
|
@@ -13,8 +15,8 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
13
15
|
const schema = viewer_schemas.opengeodeweb_viewer.model.points.visibility;
|
|
14
16
|
|
|
15
17
|
export function useModelPointsVisibilityStyle(): {
|
|
16
|
-
modelPointsVisibility: (
|
|
17
|
-
setModelPointsVisibility: (
|
|
18
|
+
modelPointsVisibility: (modelId: ModelId) => Visibility | undefined;
|
|
19
|
+
setModelPointsVisibility: (modelId: ModelId, visibility: Visibility) => Promise<unknown>;
|
|
18
20
|
} {
|
|
19
21
|
const viewerStore = useViewerStore();
|
|
20
22
|
const modelPointsCommonStyle = useModelPointsCommonStyle();
|
|
@@ -22,21 +24,24 @@ export function useModelPointsVisibilityStyle(): {
|
|
|
22
24
|
useModelComponentPointsStyle(type),
|
|
23
25
|
);
|
|
24
26
|
|
|
25
|
-
function modelPointsVisibility(
|
|
27
|
+
function modelPointsVisibility(modelId: ModelId): Visibility | undefined {
|
|
26
28
|
// oxlint-disable-next-line no-unsafe-type-assertion -- points style values are dynamically typed at runtime.
|
|
27
|
-
return modelPointsCommonStyle.modelPointsStyle(
|
|
29
|
+
return modelPointsCommonStyle.modelPointsStyle(modelId).visibility as Visibility | undefined;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
|
-
async function setModelPointsVisibility(
|
|
31
|
-
|
|
32
|
+
async function setModelPointsVisibility(
|
|
33
|
+
modelId: ModelId,
|
|
34
|
+
visibility: Visibility,
|
|
35
|
+
): Promise<unknown> {
|
|
36
|
+
const params = { id: modelId, visibility };
|
|
32
37
|
const result = await viewerStore.request(
|
|
33
38
|
{ schema, params },
|
|
34
39
|
{
|
|
35
40
|
response_function: async () => {
|
|
36
41
|
const [mutateResult] = await Promise.all([
|
|
37
|
-
modelPointsCommonStyle.mutateModelPointsStyle(
|
|
42
|
+
modelPointsCommonStyle.mutateModelPointsStyle(modelId, { visibility }),
|
|
38
43
|
...componentsPointsStyles.map(async (pointsStyle) => {
|
|
39
|
-
await pointsStyle.mutateStyledPoints(
|
|
44
|
+
await pointsStyle.mutateStyledPoints(modelId, { visibility });
|
|
40
45
|
}),
|
|
41
46
|
]);
|
|
42
47
|
return mutateResult;
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
+
import type { ModelId, ModelIdentified } from "@ogw_front/types/identifiers";
|
|
1
2
|
import { MESH_COMPONENT_TYPES } from "@ogw_front/utils/default_styles";
|
|
3
|
+
import type { ModelComponentRecord } from "@ogw_front/stores/data_helpers/mesh";
|
|
2
4
|
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
3
5
|
import type { Table } from "dexie";
|
|
4
6
|
import { database } from "@ogw_internal/database/database";
|
|
5
7
|
import type { useDataStyleState } from "@ogw_internal/stores/data_style/state";
|
|
6
8
|
|
|
7
|
-
interface ModelComponentRecord {
|
|
8
|
-
id: string;
|
|
9
|
-
geode_id: string;
|
|
10
|
-
type: string;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
9
|
type DataStyleState = ReturnType<typeof useDataStyleState>;
|
|
14
10
|
|
|
15
11
|
// oxlint-disable-next-line no-unsafe-type-assertion -- trusted Dexie table boundary; see other database table casts in this codebase.
|
|
@@ -33,8 +29,7 @@ function groupComponentsByType(
|
|
|
33
29
|
return componentsByType;
|
|
34
30
|
}
|
|
35
31
|
|
|
36
|
-
interface TypeSelectionContext {
|
|
37
|
-
readonly modelId: string;
|
|
32
|
+
interface TypeSelectionContext extends Readonly<ModelIdentified> {
|
|
38
33
|
readonly groupStyles: ReturnType<DataStyleState["getStyle"]>;
|
|
39
34
|
readonly dataStyleState: DataStyleState;
|
|
40
35
|
}
|
|
@@ -79,7 +74,7 @@ function computeTypeSelection(
|
|
|
79
74
|
}
|
|
80
75
|
|
|
81
76
|
function buildSelection(
|
|
82
|
-
modelId:
|
|
77
|
+
modelId: ModelId,
|
|
83
78
|
components: readonly ModelComponentRecord[],
|
|
84
79
|
dataStyleState: DataStyleState,
|
|
85
80
|
): string[] {
|
|
@@ -101,7 +96,7 @@ function buildSelection(
|
|
|
101
96
|
const selectionCache = new Map<string, ComputedRef<string[]>>();
|
|
102
97
|
|
|
103
98
|
function useModelSelection(
|
|
104
|
-
modelId:
|
|
99
|
+
modelId: ModelId | undefined,
|
|
105
100
|
dataStyleState: DataStyleState,
|
|
106
101
|
): ComputedRef<string[]> {
|
|
107
102
|
if (modelId === undefined || modelId === "") {
|
|
@@ -118,7 +113,7 @@ function useModelSelection(
|
|
|
118
113
|
|
|
119
114
|
void (async (): Promise<void> => {
|
|
120
115
|
try {
|
|
121
|
-
allComponents.value = await model_components_db.where("
|
|
116
|
+
allComponents.value = await model_components_db.where("data_id").equals(modelId).toArray();
|
|
122
117
|
} catch {
|
|
123
118
|
allComponents.value = [];
|
|
124
119
|
}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import type { AttributeGroup, ColorGroup } from "./coloring_groups";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type useModelSurfacesPolygonAttribute,
|
|
5
|
-
} from "./polygon";
|
|
6
|
-
import {
|
|
7
|
-
isModelSurfacesVertexAttributeValid,
|
|
8
|
-
type useModelSurfacesVertexAttribute,
|
|
9
|
-
} from "./vertex";
|
|
2
|
+
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
3
|
+
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
10
4
|
import type { useModelSurfacesColor } from "./color";
|
|
5
|
+
import type { useModelSurfacesPolygonAttribute } from "./polygon";
|
|
6
|
+
import type { useModelSurfacesVertexAttribute } from "./vertex";
|
|
11
7
|
|
|
12
8
|
type ColorStyle = ReturnType<typeof useModelSurfacesColor>;
|
|
13
9
|
type VertexAttributeStyle = ReturnType<typeof useModelSurfacesVertexAttribute>;
|
|
14
10
|
type PolygonAttributeStyle = ReturnType<typeof useModelSurfacesPolygonAttribute>;
|
|
15
11
|
|
|
16
12
|
function applyModelSurfacesConstantColoring(
|
|
17
|
-
modelId:
|
|
13
|
+
modelId: ModelId,
|
|
18
14
|
type_surfaces_ids: string[],
|
|
19
15
|
modelColorStyle: ColorStyle,
|
|
20
16
|
): Promise<unknown>[] {
|
|
@@ -32,7 +28,7 @@ function applyModelSurfacesConstantColoring(
|
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
function groupModelSurfacesVertexAttributes(
|
|
35
|
-
modelId:
|
|
31
|
+
modelId: ModelId,
|
|
36
32
|
type_surfaces_ids: string[],
|
|
37
33
|
modelSurfacesVertexAttribute: VertexAttributeStyle,
|
|
38
34
|
): Record<string, AttributeGroup> {
|
|
@@ -66,7 +62,7 @@ function groupModelSurfacesVertexAttributes(
|
|
|
66
62
|
colorMap,
|
|
67
63
|
no_data_color,
|
|
68
64
|
};
|
|
69
|
-
if (!
|
|
65
|
+
if (!isAttributeValid(attribute)) {
|
|
70
66
|
continue;
|
|
71
67
|
}
|
|
72
68
|
const key = [name, item, colorMap, minimum, maximum, JSON.stringify(no_data_color)].join("_");
|
|
@@ -77,7 +73,7 @@ function groupModelSurfacesVertexAttributes(
|
|
|
77
73
|
}
|
|
78
74
|
|
|
79
75
|
function applyModelSurfacesVertexColoring(
|
|
80
|
-
modelId:
|
|
76
|
+
modelId: ModelId,
|
|
81
77
|
type_surfaces_ids: string[],
|
|
82
78
|
modelSurfacesVertexAttribute: VertexAttributeStyle,
|
|
83
79
|
): Promise<unknown>[] {
|
|
@@ -106,7 +102,7 @@ function applyModelSurfacesVertexColoring(
|
|
|
106
102
|
}
|
|
107
103
|
|
|
108
104
|
function groupModelSurfacesPolygonAttributes(
|
|
109
|
-
modelId:
|
|
105
|
+
modelId: ModelId,
|
|
110
106
|
type_surfaces_ids: string[],
|
|
111
107
|
modelSurfacesPolygonAttribute: PolygonAttributeStyle,
|
|
112
108
|
): Record<string, AttributeGroup> {
|
|
@@ -140,7 +136,7 @@ function groupModelSurfacesPolygonAttributes(
|
|
|
140
136
|
colorMap,
|
|
141
137
|
no_data_color,
|
|
142
138
|
};
|
|
143
|
-
if (!
|
|
139
|
+
if (!isAttributeValid(attribute)) {
|
|
144
140
|
continue;
|
|
145
141
|
}
|
|
146
142
|
const key = [name, item, colorMap, minimum, maximum, JSON.stringify(no_data_color)].join("_");
|
|
@@ -151,7 +147,7 @@ function groupModelSurfacesPolygonAttributes(
|
|
|
151
147
|
}
|
|
152
148
|
|
|
153
149
|
function applyModelSurfacesPolygonColoring(
|
|
154
|
-
modelId:
|
|
150
|
+
modelId: ModelId,
|
|
155
151
|
type_surfaces_ids: string[],
|
|
156
152
|
modelSurfacesPolygonAttribute: PolygonAttributeStyle,
|
|
157
153
|
): Promise<unknown>[] {
|