@geode/opengeodeweb-front 10.34.0-rc.8 → 10.34.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/{server → .build/server}/utils/app_config.js +10 -9
- package/{server → .build/server}/utils/cleanup.js +31 -17
- package/{server → .build/server}/utils/cloud.js +1 -4
- package/{server → .build/server}/utils/microservices.js +21 -9
- package/{server → .build/server}/utils/path.js +4 -4
- package/{server → .build/server}/utils/scripts.js +9 -9
- package/.build/server/utils/server_config.js +51 -0
- package/.build/server/utils/stream.js +6 -0
- package/{server → .build/server}/utils/ws_client.js +18 -3
- package/{shared → .build/shared}/scripts.js +10 -10
- package/.build/shared/utils/call_raw.js +31 -0
- package/{shared → .build/shared}/utils/call_schema.js +2 -2
- package/.build/shared/utils/fetch_raw.js +52 -0
- package/{shared → .build/shared}/utils/fetch_schema.js +2 -2
- package/{shared → .build/shared}/utils/file.js +3 -1
- package/{shared → .build/shared}/utils/response_handlers/load.js +10 -7
- package/{shared → .build/shared}/utils/validate_schema.js +1 -1
- package/app/components/ActionButton.vue +6 -6
- package/app/components/CameraManager/List.vue +5 -5
- package/app/components/CameraManager/Saver.vue +3 -5
- package/app/components/CameraManager.vue +6 -4
- package/app/components/CameraOrientation.vue +12 -12
- package/app/components/ClippingPlaneCard.vue +4 -2
- package/app/components/ClippingPlanes.vue +8 -8
- package/app/components/CrsSelector.vue +9 -10
- package/app/components/DeleteDialog.vue +4 -2
- package/app/components/DragAndDrop.vue +10 -12
- package/app/components/DragAndDropInternal/DragAndDropInline.vue +4 -2
- package/app/components/ExtensionSelector.vue +4 -4
- package/app/components/FeedBack/ErrorBanner.vue +3 -1
- package/app/components/FeedBack/Snackers.vue +4 -3
- package/app/components/FileSelector.vue +10 -8
- package/app/components/FileUploader.vue +11 -11
- package/app/components/GlassCard.vue +1 -1
- package/app/components/HybridRenderingView.vue +7 -5
- package/app/components/HybridViewerTooltip.vue +7 -7
- package/app/components/Launcher.vue +1 -1
- package/app/components/Loading/EcoMessages.vue +9 -3
- package/app/components/Loading.vue +2 -2
- package/app/components/MissingFilesSelector.vue +12 -10
- package/app/components/ObjectSelector.vue +10 -9
- package/app/components/PackagesVersions.vue +6 -5
- package/app/components/Recaptcha.vue +3 -3
- package/app/components/RemoteRenderingView.vue +6 -7
- package/app/components/Ruler.vue +3 -3
- package/app/components/Screenshot.vue +6 -6
- package/app/components/SearchBar.vue +4 -2
- package/app/components/ShrinkFilter.vue +7 -7
- package/app/components/Step.vue +6 -5
- package/app/components/Stepper.vue +4 -3
- package/app/components/ToolPanel.vue +6 -3
- package/app/components/ViewToolbar.vue +25 -28
- package/app/components/Viewer/ContextMenu/CenterButton.vue +7 -5
- package/app/components/Viewer/ContextMenu/CircularItems.vue +3 -3
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +22 -19
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +10 -8
- package/app/components/Viewer/ContextMenu/InfoCard.vue +11 -12
- package/app/components/Viewer/EdgedCurve/SpecificEdgesOptions.vue +13 -17
- package/app/components/Viewer/Generic/Mesh/CellsOptions.vue +11 -15
- package/app/components/Viewer/Generic/Mesh/EdgesOptions.vue +12 -16
- package/app/components/Viewer/Generic/Mesh/PointsOptions.vue +8 -12
- package/app/components/Viewer/Generic/Mesh/PolygonsOptions.vue +11 -15
- package/app/components/Viewer/Generic/Mesh/PolyhedraOptions.vue +11 -15
- package/app/components/Viewer/Generic/Model/BlocksOptions.vue +67 -38
- package/app/components/Viewer/Generic/Model/CornersOptions.vue +53 -23
- package/app/components/Viewer/Generic/Model/EdgesOptions.vue +1 -3
- package/app/components/Viewer/Generic/Model/LinesOptions.vue +67 -38
- package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +31 -15
- package/app/components/Viewer/Generic/Model/ModelStyleOptions.vue +2 -3
- package/app/components/Viewer/Generic/Model/PointsOptions.vue +6 -6
- package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +69 -38
- package/app/components/Viewer/ObjectTree/Base/CommonTreeView.vue +64 -46
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +5 -5
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +13 -9
- package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +5 -5
- package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +10 -10
- package/app/components/Viewer/ObjectTree/Box.vue +6 -4
- package/app/components/Viewer/ObjectTree/Layout.vue +23 -21
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +14 -14
- package/app/components/Viewer/ObjectTree/Views/{ModelCollections.vue → ModelTree.vue} +59 -24
- package/app/components/Viewer/Options/AttributeColorBar.vue +4 -2
- package/app/components/Viewer/Options/AttributeRangeSelector.vue +4 -2
- package/app/components/Viewer/Options/AttributeSelector.vue +7 -9
- package/app/components/Viewer/Options/ColorMapList.vue +15 -13
- package/app/components/Viewer/Options/ColorMapPicker.vue +4 -4
- package/app/components/Viewer/Options/ColorPicker.vue +223 -41
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +16 -16
- package/app/components/Viewer/Options/ColormapQuickPicker.vue +7 -5
- package/app/components/Viewer/Options/OptionsSection.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +8 -6
- package/app/components/Viewer/Options/TexturesSelector.vue +1 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +8 -9
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +2 -6
- package/app/components/Viewer/Solid/SpecificPolyhedraOptions.vue +12 -16
- package/app/components/Viewer/Surface/PolygonsOptions.vue +12 -16
- package/app/components/Viewer/Ui.vue +2 -2
- package/app/components/Wrapper.vue +1 -4
- package/app/components/ZScaling.vue +5 -3
- package/app/components/csv-preview/CsvPreviewer.vue +38 -37
- package/app/components/csv-preview/CsvSettings.vue +6 -4
- package/app/components/csv-preview/CsvTable.vue +1 -1
- package/app/composables/batch_style.ts +5 -6
- package/app/composables/clipping_planes_widget.ts +73 -181
- package/app/composables/clipping_planes_widget_entries.ts +189 -0
- package/app/composables/copy_to_clipboard.ts +7 -0
- package/app/composables/global_attribute_style.ts +163 -83
- package/app/composables/hover_highlight.ts +46 -14
- package/app/composables/model_collections.ts +26 -13
- package/app/composables/model_components.ts +26 -13
- package/app/composables/project_manager.ts +76 -19
- package/app/composables/responsive_middle_truncate.ts +13 -13
- package/app/composables/stepper_tree.ts +34 -11
- package/app/composables/tree_filter.ts +66 -44
- package/app/composables/tree_keyboard_nav.ts +25 -11
- package/app/composables/tree_scroll.ts +44 -14
- package/app/composables/use_adaptive_styles.ts +66 -23
- package/app/composables/use_overlapping_picker.ts +66 -16
- package/app/composables/use_quick_colormap.ts +16 -5
- package/app/composables/virtual_tree.ts +75 -43
- package/app/composables/vtk_implicit_plane_widget.d.ts +2 -0
- package/app/plugins/auto_store_register.ts +2 -7
- package/app/plugins/click_outside_ignore_snackbars.client.ts +39 -0
- package/app/stores/app.ts +57 -192
- package/app/stores/app_helpers/extension.ts +179 -0
- package/app/stores/back.ts +37 -21
- package/app/stores/camera_manager.ts +22 -20
- package/app/stores/cloud.ts +17 -13
- package/app/stores/data.ts +88 -47
- package/app/stores/data_helpers/collections.ts +36 -38
- package/app/stores/data_helpers/mesh.ts +45 -36
- package/app/stores/data_style.ts +50 -28
- package/app/stores/feedback.ts +6 -6
- package/app/stores/hybrid_viewer.ts +41 -52
- package/app/stores/infra.ts +39 -37
- package/app/stores/menu.ts +23 -14
- package/app/stores/treeview.ts +72 -42
- package/app/stores/viewer.ts +39 -27
- package/app/utils/attributes.ts +3 -3
- package/app/utils/clipping_planes.ts +111 -14
- package/app/utils/color_picker.ts +57 -0
- package/app/utils/colormap.ts +58 -35
- package/app/utils/default_styles/index.ts +2 -2
- package/app/utils/default_styles/meshes.ts +107 -13
- package/app/utils/default_styles/models.ts +83 -14
- package/app/utils/extension.ts +47 -20
- package/app/utils/import_workflow.ts +21 -13
- package/app/utils/name_cleaner.ts +1 -1
- package/app/utils/string.ts +1 -1
- package/app/utils/treeview.ts +2 -2
- package/internal/database/base_database.ts +7 -3
- package/internal/database/database.ts +36 -26
- package/internal/database/extended_database.ts +1 -1
- package/internal/stores/data_style/mesh/cells/cell.ts +70 -34
- package/internal/stores/data_style/mesh/cells/color.ts +12 -6
- package/internal/stores/data_style/mesh/cells/common.ts +18 -8
- package/internal/stores/data_style/mesh/cells/index.ts +122 -42
- package/internal/stores/data_style/mesh/cells/textures.ts +12 -6
- package/internal/stores/data_style/mesh/cells/vertex.ts +75 -34
- package/internal/stores/data_style/mesh/cells/visibility.ts +15 -4
- package/internal/stores/data_style/mesh/edges/color.ts +12 -6
- package/internal/stores/data_style/mesh/edges/common.ts +14 -6
- package/internal/stores/data_style/mesh/edges/edge.ts +71 -39
- package/internal/stores/data_style/mesh/edges/index.ts +117 -42
- package/internal/stores/data_style/mesh/edges/vertex.ts +76 -39
- package/internal/stores/data_style/mesh/edges/visibility.ts +15 -4
- package/internal/stores/data_style/mesh/edges/width.ts +12 -4
- package/internal/stores/data_style/mesh/index.ts +30 -11
- package/internal/stores/data_style/mesh/points/color.ts +12 -6
- package/internal/stores/data_style/mesh/points/common.ts +21 -8
- package/internal/stores/data_style/mesh/points/index.ts +101 -50
- package/internal/stores/data_style/mesh/points/size.ts +12 -4
- package/internal/stores/data_style/mesh/points/vertex.ts +75 -34
- package/internal/stores/data_style/mesh/points/visibility.ts +17 -7
- package/internal/stores/data_style/mesh/polygons/color.ts +12 -6
- package/internal/stores/data_style/mesh/polygons/common.ts +23 -6
- package/internal/stores/data_style/mesh/polygons/index.ts +130 -70
- package/internal/stores/data_style/mesh/polygons/polygon.ts +77 -43
- package/internal/stores/data_style/mesh/polygons/textures.ts +12 -6
- package/internal/stores/data_style/mesh/polygons/vertex.ts +79 -39
- package/internal/stores/data_style/mesh/polygons/visibility.ts +16 -6
- package/internal/stores/data_style/mesh/polyhedra/color.ts +12 -6
- package/internal/stores/data_style/mesh/polyhedra/common.ts +14 -6
- package/internal/stores/data_style/mesh/polyhedra/index.ts +115 -56
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.ts +80 -39
- package/internal/stores/data_style/mesh/polyhedra/vertex.ts +79 -39
- package/internal/stores/data_style/mesh/polyhedra/visibility.ts +16 -6
- package/internal/stores/data_style/model/blocks/color.ts +43 -13
- package/internal/stores/data_style/model/blocks/common.ts +21 -6
- package/internal/stores/data_style/model/blocks/index.ts +89 -59
- package/internal/stores/data_style/model/blocks/polyhedron.ts +101 -44
- package/internal/stores/data_style/model/blocks/vertex.ts +107 -42
- package/internal/stores/data_style/model/blocks/visibility.ts +17 -4
- package/internal/stores/data_style/model/color.ts +171 -83
- package/internal/stores/data_style/model/common.ts +70 -21
- package/internal/stores/data_style/model/corners/color.ts +43 -11
- package/internal/stores/data_style/model/corners/common.ts +25 -6
- package/internal/stores/data_style/model/corners/index.ts +66 -41
- package/internal/stores/data_style/model/corners/vertex.ts +105 -74
- package/internal/stores/data_style/model/corners/visibility.ts +19 -4
- package/internal/stores/data_style/model/edges/common.ts +12 -4
- package/internal/stores/data_style/model/edges/index.ts +2 -1
- package/internal/stores/data_style/model/edges/visibility.ts +24 -7
- package/internal/stores/data_style/model/index.ts +24 -11
- package/internal/stores/data_style/model/lines/color.ts +41 -11
- package/internal/stores/data_style/model/lines/common.ts +17 -6
- package/internal/stores/data_style/model/lines/edge.ts +105 -42
- package/internal/stores/data_style/model/lines/index.ts +86 -59
- package/internal/stores/data_style/model/lines/vertex.ts +105 -42
- package/internal/stores/data_style/model/lines/visibility.ts +17 -4
- package/internal/stores/data_style/model/points/common.ts +8 -4
- package/internal/stores/data_style/model/points/index.ts +10 -3
- package/internal/stores/data_style/model/points/size.ts +12 -4
- package/internal/stores/data_style/model/points/visibility.ts +16 -6
- package/internal/stores/data_style/model/selection.ts +80 -58
- package/internal/stores/data_style/model/surfaces/color.ts +41 -11
- package/internal/stores/data_style/model/surfaces/common.ts +23 -6
- package/internal/stores/data_style/model/surfaces/index.ts +89 -59
- package/internal/stores/data_style/model/surfaces/polygon.ts +107 -67
- package/internal/stores/data_style/model/surfaces/vertex.ts +111 -67
- package/internal/stores/data_style/model/surfaces/visibility.ts +18 -5
- package/internal/stores/data_style/model/visibility.ts +82 -20
- package/internal/stores/data_style/state.ts +77 -65
- package/internal/stores/hybrid_viewer/brightness.ts +49 -31
- package/internal/stores/hybrid_viewer/camera.ts +191 -177
- package/internal/stores/hybrid_viewer/camera_animation.ts +11 -10
- package/internal/stores/hybrid_viewer/core.ts +64 -0
- package/internal/stores/hybrid_viewer/filters.ts +10 -16
- package/internal/stores/hybrid_viewer/highlight.ts +91 -130
- package/internal/stores/hybrid_viewer/ruler.ts +24 -15
- package/internal/stores/hybrid_viewer/scene.ts +96 -117
- package/internal/stores/hybrid_viewer/viewport.ts +74 -65
- package/internal/stores/hybrid_viewer/vtk_types.ts +13 -29
- package/internal/utils/api_fetch.ts +54 -23
- package/internal/utils/upload_file.ts +74 -53
- package/internal/utils/viewer_call.ts +22 -13
- package/internal/utils/ws_client.ts +24 -13
- package/nuxt.config.ts +58 -1
- package/package.json +20 -8
- package/server/api/cloud/extensions/run.post.ts +6 -10
- package/server/api/local/app/project_folder_path.post.ts +4 -4
- package/server/api/local/app/run_back.post.ts +5 -7
- package/server/api/local/app/run_viewer.post.ts +5 -7
- package/server/api/local/extensions/kill.post.ts +4 -3
- package/server/api/local/extensions/run.post.ts +7 -10
- package/server/api/local/extensions/upload.put.ts +44 -54
- package/server/api/microservice/app/get_is_app_ready.get.ts +4 -5
- package/server/api/microservice/app/set_app_base_url.post.ts +5 -6
- package/server/api/microservice/app/set_back_base_url.post.ts +5 -6
- package/server/api/microservice/app/set_is_app_ready.post.ts +5 -6
- package/server/api/microservice/app/set_viewer_base_url.post.ts +5 -6
- package/server/api/microservice/extensions/download.post.ts +5 -4
- package/server/api/serverless/run_cloud.post.ts +53 -11
- package/server/utils/app_config.ts +29 -22
- package/server/utils/cleanup.ts +60 -30
- package/server/utils/cloud.ts +9 -8
- package/server/utils/extension.ts +23 -9
- package/server/utils/microservices.ts +33 -24
- package/server/utils/path.ts +4 -4
- package/server/utils/scripts.ts +26 -23
- package/server/utils/server.ts +2 -2
- package/server/utils/server_config.ts +41 -27
- package/server/utils/stream.ts +6 -0
- package/server/utils/ws_client.ts +42 -8
- package/shared/scripts.ts +15 -10
- package/shared/utils/call_raw.ts +23 -16
- package/shared/utils/call_schema.ts +5 -8
- package/shared/utils/fetch_raw.ts +87 -47
- package/shared/utils/fetch_schema.ts +6 -9
- package/shared/utils/file.ts +8 -2
- package/shared/utils/response_handlers/load.ts +26 -11
- package/shared/utils/types.ts +9 -9
- package/shared/utils/validate_schema.ts +1 -1
- package/app/components/Viewer/ObjectTree/Views/ModelComponents.vue +0 -276
- package/server/types/vendor.d.ts +0 -64
- package/server/utils/server_config.js +0 -43
- package/shared/utils/call_raw.js +0 -30
- package/shared/utils/fetch_raw.js +0 -40
- /package/{opengeodeweb_front_schemas.js → .build/opengeodeweb_front_schemas.js} +0 -0
- /package/{server → .build/server}/utils/server.js +0 -0
- /package/{shared → .build/shared}/app_mode.js +0 -0
- /package/{shared → .build/shared}/utils/parse_boolean.js +0 -0
- /package/{shared → .build/shared}/utils/types.js +0 -0
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
2
|
-
// oxlint-disable eslint/sort-imports
|
|
3
|
-
import type {
|
|
4
|
-
ModelComponentStyle,
|
|
5
|
-
ModelComponentTypeStyle,
|
|
6
|
-
StyleValues,
|
|
7
|
-
} from "@ogw_internal/stores/data_style/types.js";
|
|
8
1
|
import { MESH_COMPONENT_TYPES } from "@ogw_front/utils/default_styles";
|
|
9
|
-
import {
|
|
2
|
+
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
10
3
|
import type { Table } from "dexie";
|
|
11
|
-
import
|
|
4
|
+
import { database } from "@ogw_internal/database/database";
|
|
12
5
|
import type { useDataStyleState } from "@ogw_internal/stores/data_style/state";
|
|
13
6
|
|
|
14
7
|
interface ModelComponentRecord {
|
|
@@ -19,80 +12,115 @@ interface ModelComponentRecord {
|
|
|
19
12
|
|
|
20
13
|
type DataStyleState = ReturnType<typeof useDataStyleState>;
|
|
21
14
|
|
|
15
|
+
// oxlint-disable-next-line no-unsafe-type-assertion -- trusted Dexie table boundary; see other database table casts in this codebase.
|
|
22
16
|
const model_components_db = database.model_components as unknown as Table<
|
|
23
17
|
ModelComponentRecord,
|
|
24
18
|
string
|
|
25
19
|
>;
|
|
26
20
|
|
|
27
|
-
function
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
componentStyles: Ref<Record<string, ModelComponentStyle>>,
|
|
31
|
-
modelComponentTypeStyles: Ref<Record<string, ModelComponentTypeStyle>>,
|
|
32
|
-
dataStyleState: DataStyleState,
|
|
33
|
-
): string[] {
|
|
21
|
+
function groupComponentsByType(
|
|
22
|
+
components: readonly ModelComponentRecord[],
|
|
23
|
+
): Record<string, ModelComponentRecord[]> {
|
|
34
24
|
const componentsByType: Record<string, ModelComponentRecord[]> = Object.fromEntries(
|
|
35
25
|
MESH_COMPONENT_TYPES.map((componentType) => [componentType, []]),
|
|
36
26
|
);
|
|
37
27
|
for (const component of components) {
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
const list = componentsByType[component.type];
|
|
29
|
+
if (list !== undefined) {
|
|
30
|
+
list.push(component);
|
|
40
31
|
}
|
|
41
32
|
}
|
|
33
|
+
return componentsByType;
|
|
34
|
+
}
|
|
42
35
|
|
|
36
|
+
interface TypeSelectionContext {
|
|
37
|
+
readonly modelId: string;
|
|
38
|
+
readonly groupStyles: ReturnType<DataStyleState["getStyle"]>;
|
|
39
|
+
readonly dataStyleState: DataStyleState;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function computeTypeSelection(
|
|
43
|
+
componentType: string,
|
|
44
|
+
typeComponents: readonly ModelComponentRecord[],
|
|
45
|
+
context: TypeSelectionContext,
|
|
46
|
+
): string[] {
|
|
47
|
+
const { modelId, groupStyles, dataStyleState } = context;
|
|
48
|
+
const typeKey = `${componentType.toLowerCase()}s`;
|
|
49
|
+
const typeStyleKey = `${modelId}_${componentType}`;
|
|
50
|
+
const typeStyle = dataStyleState.modelComponentTypeStyles.value[typeStyleKey];
|
|
51
|
+
// oxlint-disable-next-line no-unsafe-type-assertion -- dynamically-keyed lookup into StyleValues; see other database/style casts in this codebase.
|
|
52
|
+
const groupTypeStyle = (groupStyles as unknown as Record<string, StyleValues | undefined>)[
|
|
53
|
+
typeKey
|
|
54
|
+
];
|
|
55
|
+
const defaultVisibility =
|
|
56
|
+
// oxlint-disable-next-line no-unsafe-type-assertion -- visibility field is defined by the data style schema.
|
|
57
|
+
(typeStyle?.visibility as boolean | undefined) ??
|
|
58
|
+
// oxlint-disable-next-line no-unsafe-type-assertion -- visibility field is defined by the data style schema.
|
|
59
|
+
(groupTypeStyle?.visibility as boolean | undefined) ??
|
|
60
|
+
true;
|
|
61
|
+
|
|
62
|
+
const selection: string[] = [];
|
|
63
|
+
let allVisible = true;
|
|
64
|
+
for (const component of typeComponents) {
|
|
65
|
+
const styleKey = `${modelId}_${component.geode_id}`;
|
|
66
|
+
const componentStyle = dataStyleState.componentStyles.value[styleKey];
|
|
67
|
+
// oxlint-disable-next-line no-unsafe-type-assertion -- visibility field is defined by the data style schema.
|
|
68
|
+
const isVisible = (componentStyle?.visibility as boolean | undefined) ?? defaultVisibility;
|
|
69
|
+
if (isVisible) {
|
|
70
|
+
selection.push(component.geode_id);
|
|
71
|
+
} else {
|
|
72
|
+
allVisible = false;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (allVisible) {
|
|
76
|
+
selection.push(componentType);
|
|
77
|
+
}
|
|
78
|
+
return selection;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function buildSelection(
|
|
82
|
+
modelId: string,
|
|
83
|
+
components: readonly ModelComponentRecord[],
|
|
84
|
+
dataStyleState: DataStyleState,
|
|
85
|
+
): string[] {
|
|
86
|
+
const componentsByType = groupComponentsByType(components);
|
|
43
87
|
const groupStyles = dataStyleState.getStyle(modelId);
|
|
88
|
+
const context: TypeSelectionContext = { modelId, groupStyles, dataStyleState };
|
|
89
|
+
|
|
44
90
|
const selection: string[] = [];
|
|
45
91
|
for (const componentType of MESH_COMPONENT_TYPES) {
|
|
46
|
-
const typeComponents = componentsByType[componentType];
|
|
47
|
-
if (
|
|
92
|
+
const typeComponents = componentsByType[componentType] ?? [];
|
|
93
|
+
if (typeComponents.length === 0) {
|
|
48
94
|
continue;
|
|
49
95
|
}
|
|
50
|
-
|
|
51
|
-
const typeKey = `${componentType.toLowerCase()}s`;
|
|
52
|
-
const typeStyleKey = `${modelId}_${componentType}`;
|
|
53
|
-
const typeStyle = modelComponentTypeStyles.value[typeStyleKey];
|
|
54
|
-
const defaultVisibility =
|
|
55
|
-
(typeStyle?.visibility as boolean | undefined) ??
|
|
56
|
-
((groupStyles[typeKey] as StyleValues | undefined)?.visibility as boolean | undefined) ??
|
|
57
|
-
true;
|
|
58
|
-
|
|
59
|
-
let allVisible = true;
|
|
60
|
-
for (const component of typeComponents) {
|
|
61
|
-
const styleKey = `${modelId}_${component.geode_id}`;
|
|
62
|
-
const isVisible =
|
|
63
|
-
(componentStyles.value[styleKey]?.visibility as boolean | undefined) ?? defaultVisibility;
|
|
64
|
-
if (isVisible) {
|
|
65
|
-
selection.push(component.geode_id);
|
|
66
|
-
} else {
|
|
67
|
-
allVisible = false;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
if (allVisible) {
|
|
71
|
-
selection.push(componentType);
|
|
72
|
-
}
|
|
96
|
+
selection.push(...computeTypeSelection(componentType, typeComponents, context));
|
|
73
97
|
}
|
|
74
98
|
return selection;
|
|
75
99
|
}
|
|
76
100
|
|
|
77
101
|
const selectionCache = new Map<string, ComputedRef<string[]>>();
|
|
78
102
|
|
|
79
|
-
function useModelSelection(
|
|
80
|
-
|
|
103
|
+
function useModelSelection(
|
|
104
|
+
modelId: string | undefined,
|
|
105
|
+
dataStyleState: DataStyleState,
|
|
106
|
+
): ComputedRef<string[]> {
|
|
107
|
+
if (modelId === undefined || modelId === "") {
|
|
81
108
|
return computed<string[]>(() => []);
|
|
82
109
|
}
|
|
83
110
|
|
|
84
|
-
const cacheKey =
|
|
85
|
-
|
|
86
|
-
|
|
111
|
+
const cacheKey = modelId;
|
|
112
|
+
const cachedSelection = selectionCache.get(cacheKey);
|
|
113
|
+
if (cachedSelection !== undefined) {
|
|
114
|
+
return cachedSelection;
|
|
87
115
|
}
|
|
88
116
|
|
|
89
117
|
const allComponents = ref<ModelComponentRecord[]>([]);
|
|
90
118
|
|
|
91
|
-
(async () => {
|
|
119
|
+
void (async (): Promise<void> => {
|
|
92
120
|
try {
|
|
93
121
|
allComponents.value = await model_components_db.where("id").equals(modelId).toArray();
|
|
94
|
-
} catch
|
|
95
|
-
|
|
122
|
+
} catch {
|
|
123
|
+
allComponents.value = [];
|
|
96
124
|
}
|
|
97
125
|
})();
|
|
98
126
|
|
|
@@ -100,13 +128,7 @@ function useModelSelection(modelId: string | undefined, dataStyleState: DataStyl
|
|
|
100
128
|
if (allComponents.value.length === 0) {
|
|
101
129
|
return [];
|
|
102
130
|
}
|
|
103
|
-
return buildSelection(
|
|
104
|
-
modelId,
|
|
105
|
-
allComponents.value,
|
|
106
|
-
dataStyleState.componentStyles,
|
|
107
|
-
dataStyleState.modelComponentTypeStyles,
|
|
108
|
-
dataStyleState,
|
|
109
|
-
);
|
|
131
|
+
return buildSelection(modelId, allComponents.value, dataStyleState);
|
|
110
132
|
});
|
|
111
133
|
|
|
112
134
|
selectionCache.set(cacheKey, computedSelection);
|
|
@@ -1,21 +1,39 @@
|
|
|
1
|
-
// Not auto-fixable (eslint's sort-imports core rule has no autofixer) and this file's import order doesn't match its syntax-kind-then-alphabetical requirement - left as-is rather than manually reordered across the codebase for a purely cosmetic rule.
|
|
2
|
-
// oxlint-disable eslint/sort-imports
|
|
3
|
-
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
4
1
|
import { isModelSurfacesPolygonAttributeValid, useModelSurfacesPolygonAttribute } from "./polygon";
|
|
5
2
|
import { isModelSurfacesVertexAttributeValid, useModelSurfacesVertexAttribute } from "./vertex";
|
|
3
|
+
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
4
|
+
import { useDataStore } from "@ogw_front/stores/data";
|
|
6
5
|
import { useModelCommonStyle } from "@ogw_internal/stores/data_style/model/common";
|
|
7
6
|
import { useModelSurfacesCommonStyle } from "./common";
|
|
8
7
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
|
|
9
8
|
|
|
10
9
|
const schema = viewer_schemas.opengeodeweb_viewer.model.surfaces.color;
|
|
11
10
|
|
|
12
|
-
export function useModelSurfacesColor() {
|
|
11
|
+
export function useModelSurfacesColor(): {
|
|
12
|
+
setModelSurfacesColor: (
|
|
13
|
+
modelId: string,
|
|
14
|
+
surfaces_ids: string[],
|
|
15
|
+
color: unknown,
|
|
16
|
+
activeColoring?: string,
|
|
17
|
+
collectionId?: string,
|
|
18
|
+
) => Promise<unknown>;
|
|
19
|
+
modelSurfaceColoring: (id: string, surface_id?: string) => StyleValues;
|
|
20
|
+
modelSurfaceColor: (id: string, surface_id?: string) => unknown;
|
|
21
|
+
modelSurfaceActiveColoring: (id: string, surface_id?: string) => unknown;
|
|
22
|
+
setModelSurfacesActiveColoring: (
|
|
23
|
+
modelId: string,
|
|
24
|
+
surfaces_ids: string[],
|
|
25
|
+
activeColoring: string,
|
|
26
|
+
collectionId?: string,
|
|
27
|
+
) => Promise<unknown>;
|
|
28
|
+
} {
|
|
29
|
+
const dataStore = useDataStore();
|
|
13
30
|
const modelCommonStyle = useModelCommonStyle();
|
|
14
31
|
const modelSurfacesCommonStyle = useModelSurfacesCommonStyle();
|
|
15
32
|
const modelSurfacesVertexAttribute = useModelSurfacesVertexAttribute();
|
|
16
33
|
const modelSurfacesPolygonAttribute = useModelSurfacesPolygonAttribute();
|
|
17
34
|
|
|
18
35
|
function modelSurfaceColoring(id: string, surface_id?: string): StyleValues {
|
|
36
|
+
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring shape is defined by the data style schema.
|
|
19
37
|
return modelSurfacesCommonStyle.modelSurfaceStyle(id, surface_id).coloring as StyleValues;
|
|
20
38
|
}
|
|
21
39
|
|
|
@@ -23,13 +41,22 @@ export function useModelSurfacesColor() {
|
|
|
23
41
|
return modelSurfaceColoring(id, surface_id).constant;
|
|
24
42
|
}
|
|
25
43
|
|
|
26
|
-
function setModelSurfacesColor(
|
|
44
|
+
async function setModelSurfacesColor(
|
|
27
45
|
modelId: string,
|
|
28
46
|
surfaces_ids: string[],
|
|
29
47
|
color: unknown,
|
|
30
48
|
activeColoring = "constant",
|
|
31
|
-
|
|
32
|
-
|
|
49
|
+
collectionId?: string,
|
|
50
|
+
): Promise<unknown> {
|
|
51
|
+
const result = await modelCommonStyle.setModelTypeColor(
|
|
52
|
+
modelId,
|
|
53
|
+
surfaces_ids,
|
|
54
|
+
color,
|
|
55
|
+
schema,
|
|
56
|
+
activeColoring,
|
|
57
|
+
collectionId,
|
|
58
|
+
);
|
|
59
|
+
return result;
|
|
33
60
|
}
|
|
34
61
|
|
|
35
62
|
function modelSurfaceActiveColoring(id: string, surface_id?: string): unknown {
|
|
@@ -40,9 +67,11 @@ export function useModelSurfacesColor() {
|
|
|
40
67
|
modelId: string,
|
|
41
68
|
surfaces_ids: string[],
|
|
42
69
|
activeColoring: string,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
70
|
+
collectionId?: string,
|
|
71
|
+
): Promise<unknown> {
|
|
72
|
+
const totalSurfaceIds = await dataStore.getSurfacesGeodeIds(modelId);
|
|
73
|
+
if (surfaces_ids.length === totalSurfaceIds.length) {
|
|
74
|
+
await modelSurfacesCommonStyle.mutateModelSurfacesTypeColoring(modelId, {
|
|
46
75
|
active: activeColoring,
|
|
47
76
|
});
|
|
48
77
|
}
|
|
@@ -51,7 +80,7 @@ export function useModelSurfacesColor() {
|
|
|
51
80
|
});
|
|
52
81
|
if (activeColoring === "constant" || activeColoring === "random") {
|
|
53
82
|
const color = modelSurfaceColor(modelId, surfaces_ids[0]);
|
|
54
|
-
return setModelSurfacesColor(modelId, surfaces_ids, color, activeColoring);
|
|
83
|
+
return setModelSurfacesColor(modelId, surfaces_ids, color, activeColoring, collectionId);
|
|
55
84
|
}
|
|
56
85
|
|
|
57
86
|
if (activeColoring === "vertex") {
|
|
@@ -105,6 +134,7 @@ export function useModelSurfacesColor() {
|
|
|
105
134
|
);
|
|
106
135
|
}
|
|
107
136
|
}
|
|
137
|
+
return undefined;
|
|
108
138
|
}
|
|
109
139
|
|
|
110
140
|
return {
|
|
@@ -3,12 +3,24 @@ import merge from "lodash/merge";
|
|
|
3
3
|
import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
|
|
4
4
|
import { useModelCommonStyle } from "@ogw_internal/stores/data_style/model/common";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
interface UseModelSurfacesCommonStyleReturn {
|
|
7
|
+
modelSurfacesStyle: (id: string) => StyleValues;
|
|
8
|
+
modelSurfaceStyle: (id: string, surface_id?: string) => StyleValues;
|
|
9
|
+
modelSurfaceColoring: (id: string, surface_id?: string) => StyleValues;
|
|
10
|
+
mutateModelSurfacesColoring: (
|
|
11
|
+
id: string,
|
|
12
|
+
surfaces_ids: readonly string[],
|
|
13
|
+
values: StyleValues,
|
|
14
|
+
) => Promise<void>;
|
|
15
|
+
mutateModelSurfacesTypeColoring: (id: string, values: StyleValues) => Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function useModelSurfacesCommonStyle(): UseModelSurfacesCommonStyleReturn {
|
|
7
19
|
const dataStyleState = useDataStyleState();
|
|
8
20
|
const modelCommonStyle = useModelCommonStyle();
|
|
9
21
|
|
|
10
22
|
function modelSurfacesStyle(id: string): StyleValues {
|
|
11
|
-
return dataStyleState.getStyle(id).surfaces
|
|
23
|
+
return dataStyleState.getStyle(id).surfaces ?? {};
|
|
12
24
|
}
|
|
13
25
|
|
|
14
26
|
function modelComponentTypeSurfacesStyle(id: string): StyleValues {
|
|
@@ -27,17 +39,22 @@ export function useModelSurfacesCommonStyle() {
|
|
|
27
39
|
}
|
|
28
40
|
|
|
29
41
|
function modelSurfaceColoring(id: string, surface_id?: string): StyleValues {
|
|
42
|
+
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring shape is defined by the data style schema.
|
|
30
43
|
return modelSurfaceStyle(id, surface_id).coloring as StyleValues;
|
|
31
44
|
}
|
|
32
45
|
|
|
33
|
-
function mutateModelSurfacesColoring(
|
|
34
|
-
|
|
46
|
+
async function mutateModelSurfacesColoring(
|
|
47
|
+
id: string,
|
|
48
|
+
surfaces_ids: readonly string[],
|
|
49
|
+
values: StyleValues,
|
|
50
|
+
): Promise<void> {
|
|
51
|
+
await modelCommonStyle.mutateComponentStyles(id, [...surfaces_ids], {
|
|
35
52
|
coloring: values,
|
|
36
53
|
});
|
|
37
54
|
}
|
|
38
55
|
|
|
39
|
-
function mutateModelSurfacesTypeColoring(id: string, values: StyleValues) {
|
|
40
|
-
|
|
56
|
+
async function mutateModelSurfacesTypeColoring(id: string, values: StyleValues): Promise<void> {
|
|
57
|
+
await modelCommonStyle.mutateModelComponentTypeStyle(id, "Surface", {
|
|
41
58
|
coloring: values,
|
|
42
59
|
});
|
|
43
60
|
}
|
|
@@ -19,11 +19,21 @@ interface AttributeGroup {
|
|
|
19
19
|
surfaces_ids: string[];
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
async function setModelSurfacesDefaultStyle(_id: string) {
|
|
22
|
+
async function setModelSurfacesDefaultStyle(_id: string): Promise<void> {
|
|
23
23
|
// Placeholder
|
|
24
24
|
}
|
|
25
|
+
|
|
26
|
+
type UseModelSurfacesStyleReturn = ReturnType<typeof useModelSurfacesCommonStyle> &
|
|
27
|
+
ReturnType<typeof useModelSurfacesVisibility> &
|
|
28
|
+
ReturnType<typeof useModelSurfacesColor> &
|
|
29
|
+
ReturnType<typeof useModelSurfacesVertexAttribute> &
|
|
30
|
+
ReturnType<typeof useModelSurfacesPolygonAttribute> & {
|
|
31
|
+
applyModelSurfacesStyle: (modelId: string) => Promise<void>;
|
|
32
|
+
setModelSurfacesDefaultStyle: (id: string) => Promise<void>;
|
|
33
|
+
};
|
|
34
|
+
|
|
25
35
|
// oxlint-disable-next-line max-lines-per-function
|
|
26
|
-
export function useModelSurfacesStyle() {
|
|
36
|
+
export function useModelSurfacesStyle(): UseModelSurfacesStyleReturn {
|
|
27
37
|
const dataStore = useDataStore();
|
|
28
38
|
const modelCommonStyle = useModelSurfacesCommonStyle();
|
|
29
39
|
const modelVisibilityStyle = useModelSurfacesVisibility();
|
|
@@ -31,32 +41,39 @@ export function useModelSurfacesStyle() {
|
|
|
31
41
|
const modelSurfacesVertexAttribute = useModelSurfacesVertexAttribute();
|
|
32
42
|
const modelSurfacesPolygonAttribute = useModelSurfacesPolygonAttribute();
|
|
33
43
|
|
|
34
|
-
function applyModelSurfacesVisibilityStyle(
|
|
44
|
+
async function applyModelSurfacesVisibilityStyle(
|
|
45
|
+
modelId: string,
|
|
46
|
+
surfaces_ids: string[],
|
|
47
|
+
): Promise<void> {
|
|
35
48
|
const visibilityGroups: Record<string, string[]> = {};
|
|
36
49
|
for (const surfaces_id of surfaces_ids) {
|
|
37
50
|
const style = modelCommonStyle.modelSurfaceStyle(modelId, surfaces_id);
|
|
38
51
|
const visibility = String(style.visibility);
|
|
39
|
-
|
|
40
|
-
visibilityGroups[visibility] = [];
|
|
41
|
-
}
|
|
52
|
+
visibilityGroups[visibility] ??= [];
|
|
42
53
|
visibilityGroups[visibility].push(surfaces_id);
|
|
43
54
|
}
|
|
44
|
-
|
|
45
|
-
Object.entries(visibilityGroups).map(([visibility, ids]) =>
|
|
46
|
-
modelVisibilityStyle.setModelSurfacesVisibility(
|
|
47
|
-
|
|
55
|
+
await Promise.all(
|
|
56
|
+
Object.entries(visibilityGroups).map(async ([visibility, ids]) => {
|
|
57
|
+
const result = await modelVisibilityStyle.setModelSurfacesVisibility(
|
|
58
|
+
modelId,
|
|
59
|
+
ids,
|
|
60
|
+
visibility === "true",
|
|
61
|
+
);
|
|
62
|
+
return result;
|
|
63
|
+
}),
|
|
48
64
|
);
|
|
49
65
|
}
|
|
50
66
|
|
|
51
|
-
function applyModelSurfacesColoringStyle(
|
|
67
|
+
async function applyModelSurfacesColoringStyle(
|
|
68
|
+
modelId: string,
|
|
69
|
+
surfaces_ids: string[],
|
|
70
|
+
): Promise<unknown[]> {
|
|
52
71
|
const activeColoringGroups: Record<string, string[]> = {};
|
|
53
72
|
for (const surfaces_id of surfaces_ids) {
|
|
54
73
|
const activeColoring = String(
|
|
55
74
|
modelColorStyle.modelSurfaceActiveColoring(modelId, surfaces_id),
|
|
56
75
|
);
|
|
57
|
-
|
|
58
|
-
activeColoringGroups[activeColoring] = [];
|
|
59
|
-
}
|
|
76
|
+
activeColoringGroups[activeColoring] ??= [];
|
|
60
77
|
activeColoringGroups[activeColoring].push(surfaces_id);
|
|
61
78
|
}
|
|
62
79
|
|
|
@@ -68,15 +85,19 @@ export function useModelSurfacesStyle() {
|
|
|
68
85
|
for (const surfaces_id of type_surfaces_ids) {
|
|
69
86
|
const color = modelColorStyle.modelSurfaceColor(modelId, surfaces_id);
|
|
70
87
|
const color_key = JSON.stringify(color);
|
|
71
|
-
|
|
72
|
-
colorGroups[color_key] = { color, surfaces_ids: [] };
|
|
73
|
-
}
|
|
88
|
+
colorGroups[color_key] ??= { color, surfaces_ids: [] };
|
|
74
89
|
colorGroups[color_key].surfaces_ids.push(surfaces_id);
|
|
75
90
|
}
|
|
76
91
|
coloringPromises.push(
|
|
77
|
-
...Object.values(colorGroups).map(({ color, surfaces_ids: ids }) =>
|
|
78
|
-
modelColorStyle.setModelSurfacesColor(
|
|
79
|
-
|
|
92
|
+
...Object.values(colorGroups).map(async ({ color, surfaces_ids: ids }) => {
|
|
93
|
+
const result = await modelColorStyle.setModelSurfacesColor(
|
|
94
|
+
modelId,
|
|
95
|
+
ids,
|
|
96
|
+
color,
|
|
97
|
+
"constant",
|
|
98
|
+
);
|
|
99
|
+
return result;
|
|
100
|
+
}),
|
|
80
101
|
);
|
|
81
102
|
} else if (type === "random") {
|
|
82
103
|
coloringPromises.push(
|
|
@@ -106,28 +127,32 @@ export function useModelSurfacesStyle() {
|
|
|
106
127
|
continue;
|
|
107
128
|
}
|
|
108
129
|
const key = `${name}_${item}_${colorMap}_${minimum}_${maximum}`;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
};
|
|
118
|
-
}
|
|
130
|
+
vertexGroups[key] ??= {
|
|
131
|
+
name,
|
|
132
|
+
item,
|
|
133
|
+
minimum,
|
|
134
|
+
maximum,
|
|
135
|
+
colorMap,
|
|
136
|
+
surfaces_ids: [],
|
|
137
|
+
};
|
|
119
138
|
vertexGroups[key].surfaces_ids.push(surfaces_id);
|
|
120
139
|
}
|
|
121
140
|
coloringPromises.push(
|
|
122
141
|
...Object.values(vertexGroups).map(
|
|
123
|
-
({ name, item, minimum, maximum, colorMap, surfaces_ids: ids }) =>
|
|
124
|
-
modelSurfacesVertexAttribute.setModelSurfacesVertexAttribute(
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
142
|
+
async ({ name, item, minimum, maximum, colorMap, surfaces_ids: ids }) => {
|
|
143
|
+
const result = await modelSurfacesVertexAttribute.setModelSurfacesVertexAttribute(
|
|
144
|
+
modelId,
|
|
145
|
+
ids,
|
|
146
|
+
{
|
|
147
|
+
name,
|
|
148
|
+
item,
|
|
149
|
+
minimum,
|
|
150
|
+
maximum,
|
|
151
|
+
colorMap,
|
|
152
|
+
},
|
|
153
|
+
);
|
|
154
|
+
return result;
|
|
155
|
+
},
|
|
131
156
|
),
|
|
132
157
|
);
|
|
133
158
|
} else if (type === "polygon") {
|
|
@@ -152,41 +177,46 @@ export function useModelSurfacesStyle() {
|
|
|
152
177
|
continue;
|
|
153
178
|
}
|
|
154
179
|
const key = `${name}_${item}_${colorMap}_${minimum}_${maximum}`;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
};
|
|
164
|
-
}
|
|
180
|
+
polygonGroups[key] ??= {
|
|
181
|
+
name,
|
|
182
|
+
item,
|
|
183
|
+
minimum,
|
|
184
|
+
maximum,
|
|
185
|
+
colorMap,
|
|
186
|
+
surfaces_ids: [],
|
|
187
|
+
};
|
|
165
188
|
polygonGroups[key].surfaces_ids.push(surfaces_id);
|
|
166
189
|
}
|
|
167
190
|
coloringPromises.push(
|
|
168
191
|
...Object.values(polygonGroups).map(
|
|
169
|
-
({ name, item, minimum, maximum, colorMap, surfaces_ids: ids }) =>
|
|
170
|
-
modelSurfacesPolygonAttribute.setModelSurfacesPolygonAttribute(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
192
|
+
async ({ name, item, minimum, maximum, colorMap, surfaces_ids: ids }) => {
|
|
193
|
+
const result = await modelSurfacesPolygonAttribute.setModelSurfacesPolygonAttribute(
|
|
194
|
+
modelId,
|
|
195
|
+
ids,
|
|
196
|
+
{
|
|
197
|
+
name,
|
|
198
|
+
item,
|
|
199
|
+
minimum,
|
|
200
|
+
maximum,
|
|
201
|
+
colorMap,
|
|
202
|
+
},
|
|
203
|
+
);
|
|
204
|
+
return result;
|
|
205
|
+
},
|
|
177
206
|
),
|
|
178
207
|
);
|
|
179
208
|
}
|
|
180
209
|
}
|
|
181
|
-
|
|
210
|
+
const results = await Promise.all(coloringPromises);
|
|
211
|
+
return results;
|
|
182
212
|
}
|
|
183
213
|
|
|
184
|
-
async function applyModelSurfacesStyle(modelId: string) {
|
|
214
|
+
async function applyModelSurfacesStyle(modelId: string): Promise<void> {
|
|
185
215
|
const surfaces_ids = await dataStore.getSurfacesGeodeIds(modelId);
|
|
186
216
|
if (surfaces_ids.length === 0) {
|
|
187
217
|
return;
|
|
188
218
|
}
|
|
189
|
-
|
|
219
|
+
await Promise.all([
|
|
190
220
|
applyModelSurfacesVisibilityStyle(modelId, surfaces_ids),
|
|
191
221
|
applyModelSurfacesColoringStyle(modelId, surfaces_ids),
|
|
192
222
|
]);
|