@geode/opengeodeweb-front 11.2.2-rc.1 → 12.0.0-rc.2
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/.build/tests/browser/helpers/object_trees/main_object_tree.js +3 -3
- package/.build/tests/browser/helpers/object_trees/model_components_object_tree.js +2 -2
- package/.build/tests/browser/suites/model/surfaces.js +1 -1
- package/app/app.config.ts +28 -0
- package/app/assets/css/main.css +11 -0
- package/app/assets/geode_objects.ts +37 -108
- package/app/assets/img/geode_objects/HorizonStack3D.svg +10 -0
- package/app/components/ActionButton.vue +9 -2
- package/app/components/CameraManager/List.vue +6 -6
- package/app/components/CameraManager.vue +0 -1
- package/app/components/CameraOrientation.vue +12 -7
- package/app/components/ChromeTheme.vue +20 -0
- package/app/components/ClippingPlaneCard.vue +2 -3
- package/app/components/ClippingPlanes.vue +2 -2
- package/app/components/CrsSelector.vue +8 -8
- package/app/components/DeleteDialog.vue +12 -16
- package/app/components/DragAndDropInternal/DragAndDropInline.vue +7 -7
- package/app/components/DragAndDropInternal/DragAndDropOverlay.vue +87 -82
- package/app/components/ExtensionSelector.vue +21 -14
- package/app/components/FactorFilterPanel.vue +0 -1
- package/app/components/FeedBack/ErrorBanner.vue +8 -9
- package/app/components/FeedBack/Snackers.vue +5 -7
- package/app/components/FileUploader.vue +13 -21
- package/app/components/GlassCard.vue +3 -1
- package/app/components/HybridRenderingView.vue +2 -0
- package/app/components/HybridViewerTooltip.vue +4 -4
- package/app/components/Launcher.vue +1 -1
- package/app/components/Loading/EcoMessages.vue +17 -11
- package/app/components/Loading/Footer.vue +2 -2
- package/app/components/Loading/Header.vue +9 -4
- package/app/components/Loading/Progress.vue +7 -3
- package/app/components/Loading.vue +54 -46
- package/app/components/MissingFilesSelector.vue +5 -5
- package/app/components/ObjectSelector.vue +8 -15
- package/app/components/PackagesVersions.vue +1 -3
- package/app/components/ProjectCrs.vue +1 -1
- package/app/components/Screenshot.vue +23 -15
- package/app/components/SearchBar.vue +1 -3
- package/app/components/SliceCard.vue +1 -2
- package/app/components/Step.vue +1 -1
- package/app/components/Stepper.vue +13 -11
- package/app/components/ThresholdCard.vue +1 -1
- package/app/components/ThresholdFilter.vue +2 -2
- package/app/components/TimeSeriesTargetSelector.vue +3 -6
- package/app/components/ToolPanel.vue +3 -9
- package/app/components/Viewer/Basemap/CropOptions.vue +1 -1
- package/app/components/Viewer/Basemap/OpacityOptions.vue +1 -1
- package/app/components/Viewer/ContextMenu/CenterButton.vue +9 -3
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +1 -1
- package/app/components/Viewer/ContextMenu/ContextMenuItem.vue +17 -6
- package/app/components/Viewer/ContextMenu/InfoCard.vue +12 -13
- 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/Base/CommonTreeView.vue +4 -4
- package/app/components/Viewer/ObjectTree/Base/ComponentRelations.vue +1 -1
- package/app/components/Viewer/ObjectTree/Base/Controls.vue +22 -18
- package/app/components/Viewer/ObjectTree/Base/ItemLabel.vue +11 -11
- package/app/components/Viewer/ObjectTree/Base/StickyHeader.vue +3 -3
- package/app/components/Viewer/ObjectTree/Base/TreeRow.vue +6 -9
- package/app/components/Viewer/ObjectTree/Box.vue +20 -21
- package/app/components/Viewer/ObjectTree/Layout.vue +28 -25
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +4 -3
- package/app/components/Viewer/ObjectTree/Views/ModelTree.vue +1 -1
- package/app/components/Viewer/Options/AttributeRangeSelector.vue +1 -1
- package/app/components/Viewer/Options/AttributeSelector.vue +1 -1
- package/app/components/Viewer/Options/ColorMapList.vue +7 -9
- package/app/components/Viewer/Options/ColorMapPicker.vue +2 -2
- package/app/components/Viewer/Options/ColorPicker.vue +9 -9
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +9 -9
- package/app/components/Viewer/Options/NoDataColorInfo.vue +4 -4
- package/app/components/Viewer/Options/Sliders/Opacity.vue +1 -1
- package/app/components/Viewer/Options/Sliders/Slider.vue +1 -1
- package/app/components/Viewer/Options/TextureItem.vue +11 -8
- package/app/components/Viewer/Options/TexturesSelector.vue +3 -3
- package/app/components/Viewer/Options/VisibilitySwitch.vue +1 -1
- package/app/components/Viewer/OrientationCompass.vue +223 -0
- package/app/components/Viewer/OrientationGlobe.vue +376 -0
- package/app/components/Viewer/OrientationOverlay.vue +47 -0
- package/app/components/Viewer/OverlappingObjectsPicker.vue +10 -7
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +4 -5
- package/app/components/Viewer/Scene/BackgroundOptions.vue +3 -3
- package/app/components/Viewer/Scene/OrientationWidgetOptions.vue +1 -1
- package/app/components/Viewer/Scene/TextOptions.vue +3 -3
- 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/components/Viewer/ToolActiveChip.vue +1 -1
- package/app/components/Viewer/Ui.vue +2 -2
- package/app/components/csv-preview/CsvPreviewer.vue +17 -24
- package/app/components/csv-preview/CsvSettings.vue +6 -6
- package/app/components/csv-preview/CsvTable.vue +11 -9
- 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/chrome_theme.ts +23 -0
- 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/orientation_overlay.ts +133 -0
- package/app/composables/project_manager_helpers/reset.ts +2 -0
- package/app/composables/project_manager_helpers/types.ts +2 -2
- package/app/composables/use_adaptive_styles.ts +42 -21
- package/app/composables/use_overlapping_picker.ts +10 -8
- package/app/composables/view_toolbar_options.ts +7 -7
- package/app/composables/view_toolbar_tool_options.ts +9 -11
- package/app/composables/viewer_context_menu.ts +4 -2
- package/app/composables/viewer_reset.ts +54 -0
- package/app/plugins/chrome_theme.ts +10 -0
- package/app/plugins/phosphor_icons.ts +13 -0
- package/app/plugins/scene_colors.ts +10 -0
- 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/hybrid_viewer.ts +5 -3
- package/app/stores/menu.ts +18 -12
- package/app/stores/treeview.ts +5 -4
- package/app/stores/viewer.ts +2 -0
- 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 +24 -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/orientation_compass.ts +103 -0
- package/app/utils/orientation_gizmo.ts +73 -0
- package/app/utils/orientation_globe.ts +145 -0
- package/app/utils/orientation_strata.ts +119 -0
- package/app/utils/phosphor_icons.ts +105 -0
- 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 +31 -19
- package/internal/stores/data_style/time_step.ts +3 -2
- package/internal/stores/data_style/types.ts +3 -4
- package/internal/stores/hybrid_viewer/brightness.ts +14 -7
- package/internal/stores/hybrid_viewer/camera.ts +1 -1
- package/internal/stores/hybrid_viewer/constants.ts +1 -12
- 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 +11 -4
- package/nuxt.config.ts +9 -1
- package/package.json +4 -2
- package/shared/utils/response_handlers/load.ts +19 -11
- package/tests/browser/helpers/object_trees/main_object_tree.ts +3 -3
- package/tests/browser/helpers/object_trees/model_components_object_tree.ts +2 -2
- package/tests/browser/suites/model/surfaces.ts +1 -1
- package/tests/unit/helpers/phosphor_glyphs.ts +46 -0
- package/app/assets/viewer_svgs/camera-bookmark.svg +0 -64
- package/app/types/style.ts +0 -13
package/app/stores/menu.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type {
|
|
2
|
-
DataIdentified,
|
|
3
2
|
GeodeObjectType,
|
|
4
|
-
GeodeObjectTyped,
|
|
5
3
|
ViewerObjectType,
|
|
6
|
-
|
|
7
|
-
} from "@ogw_front/types/identifiers";
|
|
4
|
+
} from "@geode/opengeodeweb-microservice/data_types";
|
|
8
5
|
import { type MenuItems, menusData } from "./menu_helpers/menus_data.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
import type { DataIdentified } from "@ogw_front/types/identifiers";
|
|
7
|
+
|
|
8
|
+
// What the menus of an entry are chosen by: its viewer_object_type and geode_object_type, or keys when it is not a data
|
|
9
|
+
type MenuViewerObjectType =
|
|
10
|
+
| ViewerObjectType
|
|
11
|
+
| "scene"
|
|
12
|
+
| "basemap"
|
|
13
|
+
| "model_component"
|
|
14
|
+
| "model_component_type";
|
|
15
|
+
type MenuObjectType = GeodeObjectType | "scene" | "Basemap" | "Map" | "component" | "type";
|
|
16
|
+
|
|
17
|
+
interface MenuMetaData extends Partial<DataIdentified> {
|
|
18
|
+
viewer_object_type?: MenuViewerObjectType;
|
|
19
|
+
geode_object_type?: MenuObjectType;
|
|
12
20
|
targetIds?: string[];
|
|
13
21
|
[key: string]: unknown;
|
|
14
22
|
}
|
|
@@ -44,14 +52,12 @@ export const useMenuStore = defineStore("menu", () => {
|
|
|
44
52
|
);
|
|
45
53
|
|
|
46
54
|
function getMenuItems(
|
|
47
|
-
viewerObjectType:
|
|
48
|
-
geodeObjectType:
|
|
55
|
+
viewerObjectType: MenuViewerObjectType | undefined,
|
|
56
|
+
geodeObjectType: MenuObjectType | undefined,
|
|
49
57
|
): MenuItems {
|
|
50
58
|
if (
|
|
51
59
|
viewerObjectType === undefined ||
|
|
52
|
-
viewerObjectType === "" ||
|
|
53
60
|
geodeObjectType === undefined ||
|
|
54
|
-
geodeObjectType === "" ||
|
|
55
61
|
!menus.value[viewerObjectType]
|
|
56
62
|
) {
|
|
57
63
|
return [];
|
|
@@ -138,4 +144,4 @@ export const useMenuStore = defineStore("menu", () => {
|
|
|
138
144
|
};
|
|
139
145
|
});
|
|
140
146
|
|
|
141
|
-
export type { MenuMetaData };
|
|
147
|
+
export type { MenuMetaData, MenuViewerObjectType };
|
package/app/stores/treeview.ts
CHANGED
|
@@ -4,15 +4,16 @@ import { consola } from "consola";
|
|
|
4
4
|
// oxlint-disable eslint/sort-imports, eslint/max-lines
|
|
5
5
|
import { defineStore } from "pinia";
|
|
6
6
|
|
|
7
|
+
import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
7
8
|
import type {
|
|
8
|
-
DataId,
|
|
9
|
-
GeodeId,
|
|
10
9
|
GeodeIdentified,
|
|
11
|
-
GeodeObjectType,
|
|
12
10
|
GeodeObjectTyped,
|
|
13
|
-
ViewerObjectType,
|
|
14
11
|
ViewerObjectTyped,
|
|
15
12
|
} from "@ogw_front/types/identifiers";
|
|
13
|
+
import type {
|
|
14
|
+
GeodeObjectType,
|
|
15
|
+
ViewerObjectType,
|
|
16
|
+
} from "@geode/opengeodeweb-microservice/data_types";
|
|
16
17
|
import type { TreeGroup, TreeNode } from "@ogw_front/types/tree";
|
|
17
18
|
import { ref, watch } from "vue";
|
|
18
19
|
import { getTable } from "@ogw_internal/database/database";
|
package/app/stores/viewer.ts
CHANGED
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
isCloudMode,
|
|
21
21
|
} from "@ogw_front/utils/stores.js";
|
|
22
22
|
import { Status } from "@ogw_front/utils/status";
|
|
23
|
+
import { afterViewerReset } from "@ogw_front/composables/viewer_reset";
|
|
23
24
|
import { useInfraStore } from "@ogw_front/stores/infra";
|
|
24
25
|
|
|
25
26
|
import type {
|
|
@@ -135,6 +136,7 @@ export const useViewerStore = defineStore(
|
|
|
135
136
|
schema,
|
|
136
137
|
timeout,
|
|
137
138
|
});
|
|
139
|
+
await afterViewerReset(request);
|
|
138
140
|
status.value = Status.CONNECTED;
|
|
139
141
|
} catch (error) {
|
|
140
142
|
status.value = Status.NOT_CONNECTED;
|
package/app/types/attribute.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type AttributeItem = number;
|
|
1
|
+
import type {
|
|
2
|
+
AttributeRangeMaximum,
|
|
3
|
+
AttributeRangeMinimum,
|
|
4
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
6
5
|
|
|
7
6
|
// The name of the color map that colors a data by an attribute
|
|
8
7
|
type AttributeColorMap = string;
|
|
@@ -10,12 +9,6 @@ type AttributeColorMap = string;
|
|
|
10
9
|
// Which time step of its series an attribute is read at, an index into the time steps of the attribute
|
|
11
10
|
type AttributeTimeStep = number;
|
|
12
11
|
|
|
13
|
-
// The lower bound of the range an attribute coloring covers
|
|
14
|
-
type AttributeRangeMinimum = number;
|
|
15
|
-
|
|
16
|
-
// The upper bound of the range an attribute coloring covers
|
|
17
|
-
type AttributeRangeMaximum = number;
|
|
18
|
-
|
|
19
12
|
// The range an attribute coloring covers, a bound being undefined until one is stored for it
|
|
20
13
|
type AttributeRange = [
|
|
21
14
|
minimum: AttributeRangeMinimum | undefined,
|
|
@@ -25,13 +18,4 @@ type AttributeRange = [
|
|
|
25
18
|
// A range of an attribute with both of its bounds set
|
|
26
19
|
type ValidAttributeRange = [minimum: AttributeRangeMinimum, maximum: AttributeRangeMaximum];
|
|
27
20
|
|
|
28
|
-
export type {
|
|
29
|
-
AttributeColorMap,
|
|
30
|
-
AttributeItem,
|
|
31
|
-
AttributeName,
|
|
32
|
-
AttributeRange,
|
|
33
|
-
AttributeRangeMaximum,
|
|
34
|
-
AttributeRangeMinimum,
|
|
35
|
-
AttributeTimeStep,
|
|
36
|
-
ValidAttributeRange,
|
|
37
|
-
};
|
|
21
|
+
export type { AttributeColorMap, AttributeRange, AttributeTimeStep, ValidAttributeRange };
|
package/app/types/identifiers.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { DataId, GeodeId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
2
|
+
import type {
|
|
3
|
+
GeodeObjectType,
|
|
4
|
+
ViewerObjectType,
|
|
5
|
+
} from "@geode/opengeodeweb-microservice/data_types";
|
|
6
6
|
|
|
7
7
|
// Id of a component of a model (a corner, a line, a surface or a block): its geode_id
|
|
8
8
|
type ModelComponentId = GeodeId;
|
|
@@ -25,12 +25,6 @@ type SurfaceId = ModelComponentId;
|
|
|
25
25
|
// A block of a model, by its id in the model
|
|
26
26
|
type BlockId = ModelComponentId;
|
|
27
27
|
|
|
28
|
-
// Type of an OpenGeode object, as named by OpenGeode (BRep, TriangulatedSurface3D, ...)
|
|
29
|
-
type GeodeObjectType = string;
|
|
30
|
-
|
|
31
|
-
// What a data is displayed as in the viewer: mesh, model, or an entry of the menus (basemap, model_component, ...)
|
|
32
|
-
type ViewerObjectType = string;
|
|
33
|
-
|
|
34
28
|
interface GeodeIdentified {
|
|
35
29
|
geode_id: GeodeId;
|
|
36
30
|
}
|
|
@@ -55,11 +49,8 @@ interface ModelIdentified {
|
|
|
55
49
|
export type {
|
|
56
50
|
BlockId,
|
|
57
51
|
CornerId,
|
|
58
|
-
DataId,
|
|
59
52
|
DataIdentified,
|
|
60
|
-
GeodeId,
|
|
61
53
|
GeodeIdentified,
|
|
62
|
-
GeodeObjectType,
|
|
63
54
|
GeodeObjectTyped,
|
|
64
55
|
LineId,
|
|
65
56
|
MeshId,
|
|
@@ -67,6 +58,5 @@ export type {
|
|
|
67
58
|
ModelId,
|
|
68
59
|
ModelIdentified,
|
|
69
60
|
SurfaceId,
|
|
70
|
-
ViewerObjectType,
|
|
71
61
|
ViewerObjectTyped,
|
|
72
62
|
};
|
package/app/utils/attributes.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { AttributeName
|
|
1
|
+
import type { AttributeName } from "@geode/opengeodeweb-viewer/schema_types";
|
|
2
|
+
import type { AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
2
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
3
4
|
|
|
4
5
|
interface AttributeRangeSource {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
2
2
|
|
|
3
3
|
const RGB_MAX = 255;
|
|
4
4
|
const PERCENT_MAX = 100;
|
|
@@ -24,7 +24,7 @@ function parseAlpha(alphaText: string | undefined): number {
|
|
|
24
24
|
return Math.min(1, Math.max(0, roundedAlpha));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function parseColorString(colorText: string):
|
|
27
|
+
function parseColorString(colorText: string): ColorRGBA | undefined {
|
|
28
28
|
if (colorText === "") {
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
@@ -47,7 +47,7 @@ function parseColorString(colorText: string): RGBAColor | undefined {
|
|
|
47
47
|
return { red, green, blue, alpha };
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
function formatColorString(color:
|
|
50
|
+
function formatColorString(color: ColorRGBA, mode: string): string {
|
|
51
51
|
const { red, green, blue, alpha } = color;
|
|
52
52
|
const roundRed = Math.round(red);
|
|
53
53
|
const roundGreen = Math.round(green);
|
package/app/utils/crs.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { CrsItem, NewDataItem } from "@ogw_front/stores/data";
|
|
2
|
-
import type {
|
|
2
|
+
import type { CRS } from "@geode/opengeodeweb-back/schema_types";
|
|
3
3
|
import type { LegacyDataId } from "@ogw_front/utils/legacy_data_id";
|
|
4
4
|
|
|
5
|
-
function formatCrs(crs:
|
|
5
|
+
function formatCrs(crs: CRS | undefined): string {
|
|
6
6
|
return crs ? `${crs.authority}:${crs.code} — ${crs.name}` : "None";
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
// Code alone, for narrow places: the full name goes in a tooltip
|
|
10
|
-
function formatCrsCode(crs:
|
|
10
|
+
function formatCrsCode(crs: CRS | undefined): string {
|
|
11
11
|
return crs ? `${crs.authority}:${crs.code}` : "None";
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// The name is only a label: two CRS are the same when their authority code is
|
|
15
|
-
function sameCrs(left:
|
|
15
|
+
function sameCrs(left: CRS | undefined, right: CRS | undefined): boolean {
|
|
16
16
|
return (
|
|
17
17
|
left !== undefined &&
|
|
18
18
|
right !== undefined &&
|
|
@@ -22,7 +22,7 @@ function sameCrs(left: CRSList | undefined, right: CRSList | undefined): boolean
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// Same CRS, or both still in local coordinates
|
|
25
|
-
function sameCrsState(left:
|
|
25
|
+
function sameCrsState(left: CRS | undefined, right: CRS | undefined): boolean {
|
|
26
26
|
return (left === undefined && right === undefined) || sameCrs(left, right);
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -31,7 +31,7 @@ function oldestCrs(
|
|
|
31
31
|
items:
|
|
32
32
|
| readonly Pick<CrsItem, "crs" | "created_at">[]
|
|
33
33
|
| readonly (LegacyDataId<NewDataItem> | NewDataItem)[],
|
|
34
|
-
):
|
|
34
|
+
): CRS | undefined {
|
|
35
35
|
return items
|
|
36
36
|
.filter((item) => item.crs !== undefined)
|
|
37
37
|
.toSorted((left, right) => (left.created_at ?? "").localeCompare(right.created_at ?? ""))[0]
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
red: number;
|
|
3
|
-
green: number;
|
|
4
|
-
blue: number;
|
|
5
|
-
alpha: number;
|
|
6
|
-
}
|
|
1
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
7
2
|
|
|
8
3
|
interface AttributeConfig {
|
|
9
4
|
name: string | undefined;
|
|
@@ -13,7 +8,7 @@ interface AttributeConfig {
|
|
|
13
8
|
// How a component of a data is colored: by a constant color or by the attribute of its vertices
|
|
14
9
|
interface ComponentColoring {
|
|
15
10
|
active: string;
|
|
16
|
-
constant:
|
|
11
|
+
constant: ColorRGBA;
|
|
17
12
|
vertex: AttributeConfig;
|
|
18
13
|
}
|
|
19
14
|
|
|
@@ -21,52 +16,52 @@ interface ComponentColoring {
|
|
|
21
16
|
const MESH_DEFAULT_ACTIVE_COLORING = "constant";
|
|
22
17
|
const POINTS_DEFAULT_VISIBILITY = true;
|
|
23
18
|
const POINTS_DEFAULT_SIZE = 10;
|
|
24
|
-
const POINTS_DEFAULT_COLOR:
|
|
19
|
+
const POINTS_DEFAULT_COLOR: ColorRGBA = { red: 20, green: 20, blue: 20, alpha: 1 };
|
|
25
20
|
const EDGES_DEFAULT_VISIBILITY = true;
|
|
26
21
|
const EDGES_DEFAULT_WIDTH = 2;
|
|
27
|
-
const EDGES_DEFAULT_COLOR:
|
|
22
|
+
const EDGES_DEFAULT_COLOR: ColorRGBA = { red: 20, green: 20, blue: 20, alpha: 1 };
|
|
28
23
|
const CELLS_DEFAULT_VISIBILITY = true;
|
|
29
|
-
const CELLS_DEFAULT_COLOR:
|
|
24
|
+
const CELLS_DEFAULT_COLOR: ColorRGBA = { red: 255, green: 255, blue: 255, alpha: 1 };
|
|
30
25
|
const POLYGONS_DEFAULT_VISIBILITY = true;
|
|
31
|
-
const POLYGONS_DEFAULT_COLOR:
|
|
26
|
+
const POLYGONS_DEFAULT_COLOR: ColorRGBA = { red: 255, green: 255, blue: 255, alpha: 1 };
|
|
32
27
|
const POLYHEDRA_DEFAULT_VISIBILITY = true;
|
|
33
|
-
const POLYHEDRA_DEFAULT_COLOR:
|
|
28
|
+
const POLYHEDRA_DEFAULT_COLOR: ColorRGBA = { red: 255, green: 255, blue: 255, alpha: 1 };
|
|
34
29
|
|
|
35
30
|
// Model
|
|
36
|
-
const MODEL_DEFAULT_COLOR:
|
|
31
|
+
const MODEL_DEFAULT_COLOR: ColorRGBA = { red: 255, green: 255, blue: 255, alpha: 1 };
|
|
37
32
|
const MODEL_DEFAULT_ACTIVE_COLORING = "constant";
|
|
38
33
|
|
|
39
34
|
const CORNERS_DEFAULT_VISIBILITY = true;
|
|
40
|
-
const CORNERS_DEFAULT_COLOR:
|
|
35
|
+
const CORNERS_DEFAULT_COLOR: ColorRGBA = { red: 20, green: 20, blue: 20, alpha: 1 };
|
|
41
36
|
const CORNERS_DEFAULT_ACTIVE_COLORING = "constant";
|
|
42
37
|
const LINES_DEFAULT_VISIBILITY = true;
|
|
43
|
-
const LINES_DEFAULT_COLOR:
|
|
38
|
+
const LINES_DEFAULT_COLOR: ColorRGBA = { red: 20, green: 20, blue: 20, alpha: 1 };
|
|
44
39
|
const LINES_DEFAULT_ACTIVE_COLORING = "constant";
|
|
45
40
|
const SURFACES_DEFAULT_VISIBILITY = true;
|
|
46
|
-
const SURFACES_DEFAULT_COLOR:
|
|
41
|
+
const SURFACES_DEFAULT_COLOR: ColorRGBA = { red: 255, green: 255, blue: 255, alpha: 1 };
|
|
47
42
|
const SURFACES_DEFAULT_ACTIVE_COLORING = "constant";
|
|
48
43
|
const BLOCKS_DEFAULT_VISIBILITY = true;
|
|
49
|
-
const BLOCKS_DEFAULT_COLOR:
|
|
44
|
+
const BLOCKS_DEFAULT_COLOR: ColorRGBA = { red: 255, green: 255, blue: 255, alpha: 1 };
|
|
50
45
|
const BLOCKS_DEFAULT_ACTIVE_COLORING = "constant";
|
|
51
46
|
|
|
52
47
|
const MESH_COMPONENT_TYPES = ["Corner", "Line", "Surface", "Block"];
|
|
53
48
|
|
|
54
|
-
const DEFAULT_MODEL_COMPONENT_TYPE_COLORS: Record<string,
|
|
49
|
+
const DEFAULT_MODEL_COMPONENT_TYPE_COLORS: Record<string, ColorRGBA> = {
|
|
55
50
|
Corner: CORNERS_DEFAULT_COLOR,
|
|
56
51
|
Line: LINES_DEFAULT_COLOR,
|
|
57
52
|
Surface: SURFACES_DEFAULT_COLOR,
|
|
58
53
|
Block: BLOCKS_DEFAULT_COLOR,
|
|
59
54
|
};
|
|
60
55
|
|
|
61
|
-
const DEFAULT_NO_DATA_COLOR:
|
|
56
|
+
const DEFAULT_NO_DATA_COLOR: ColorRGBA = { red: 128, green: 128, blue: 128, alpha: 1 };
|
|
62
57
|
|
|
63
58
|
// Scene
|
|
64
|
-
const SCENE_DEFAULT_BACKGROUND_COLOR:
|
|
65
|
-
const SCENE_DEFAULT_TEXT_COLOR:
|
|
59
|
+
const SCENE_DEFAULT_BACKGROUND_COLOR: ColorRGBA = { red: 180, green: 180, blue: 180, alpha: 1 };
|
|
60
|
+
const SCENE_DEFAULT_TEXT_COLOR: ColorRGBA = { red: 0, green: 0, blue: 0, alpha: 1 };
|
|
66
61
|
const SCENE_DEFAULT_FONT_FAMILY = "arial";
|
|
67
62
|
const SCENE_DEFAULT_ORIENTATION_WIDGET = "axes";
|
|
68
63
|
|
|
69
|
-
export type {
|
|
64
|
+
export type { AttributeConfig, ComponentColoring };
|
|
70
65
|
export {
|
|
71
66
|
POINTS_DEFAULT_VISIBILITY,
|
|
72
67
|
POINTS_DEFAULT_SIZE,
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
solidDefaultStyle,
|
|
21
21
|
surfaceDefaultStyle,
|
|
22
22
|
} from "./meshes";
|
|
23
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
23
24
|
import type { SceneStyle } from "@ogw_internal/stores/data_style/types";
|
|
24
25
|
|
|
25
26
|
function default_styles(): Record<string, unknown> {
|
|
@@ -57,11 +58,30 @@ function getDefaultStyle(type: string): unknown {
|
|
|
57
58
|
return styles[type];
|
|
58
59
|
}
|
|
59
60
|
|
|
61
|
+
interface SceneColors {
|
|
62
|
+
background?: ColorRGBA;
|
|
63
|
+
text?: ColorRGBA;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// The app's own scene colors (`ogwFront.sceneColors` in app.config.ts), set at startup by plugins/scene_colors.ts.
|
|
67
|
+
// They only shape a new or reset scene style: a saved scene style, or a color the user picked, is kept as is.
|
|
68
|
+
let appSceneColors: SceneColors = {};
|
|
69
|
+
|
|
70
|
+
function setSceneColors(colors: SceneColors): void {
|
|
71
|
+
appSceneColors = colors;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function getSceneColors(): Readonly<SceneColors> {
|
|
75
|
+
return appSceneColors;
|
|
76
|
+
}
|
|
77
|
+
|
|
60
78
|
function getDefaultSceneStyle(): SceneStyle {
|
|
79
|
+
const background = appSceneColors.background ?? SCENE_DEFAULT_BACKGROUND_COLOR;
|
|
80
|
+
const text = appSceneColors.text ?? SCENE_DEFAULT_TEXT_COLOR;
|
|
61
81
|
return {
|
|
62
82
|
id: "scene",
|
|
63
|
-
background_color: { ...
|
|
64
|
-
text: { color: { ...
|
|
83
|
+
background_color: { ...background },
|
|
84
|
+
text: { color: { ...text }, font_family: SCENE_DEFAULT_FONT_FAMILY },
|
|
65
85
|
orientation_widget: SCENE_DEFAULT_ORIENTATION_WIDGET,
|
|
66
86
|
};
|
|
67
87
|
}
|
|
@@ -74,4 +94,5 @@ export {
|
|
|
74
94
|
MODEL_DEFAULT_ACTIVE_COLORING,
|
|
75
95
|
DEFAULT_NO_DATA_COLOR,
|
|
76
96
|
} from "./constants";
|
|
77
|
-
export { getDefaultSceneStyle, getDefaultStyle };
|
|
97
|
+
export { getDefaultSceneStyle, getDefaultStyle, getSceneColors, setSceneColors };
|
|
98
|
+
export type { SceneColors };
|
|
@@ -14,9 +14,13 @@ import {
|
|
|
14
14
|
POLYGONS_DEFAULT_VISIBILITY,
|
|
15
15
|
POLYHEDRA_DEFAULT_COLOR,
|
|
16
16
|
POLYHEDRA_DEFAULT_VISIBILITY,
|
|
17
|
-
type RGBAColor,
|
|
18
17
|
} from "./constants";
|
|
19
|
-
import type {
|
|
18
|
+
import type {
|
|
19
|
+
ColorRGBA,
|
|
20
|
+
EdgeWidth,
|
|
21
|
+
PointSize,
|
|
22
|
+
Visibility,
|
|
23
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
20
24
|
import type { MeshApplyTexturesParams } from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
21
25
|
|
|
22
26
|
function emptyAttributeConfig(): AttributeConfig {
|
|
@@ -44,13 +48,13 @@ interface MeshPolyhedraColoring extends ComponentColoring {
|
|
|
44
48
|
interface MeshPointsStyle {
|
|
45
49
|
visibility: Visibility;
|
|
46
50
|
coloring: ComponentColoring;
|
|
47
|
-
size:
|
|
51
|
+
size: PointSize;
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
interface MeshEdgesStyle {
|
|
51
55
|
visibility: Visibility;
|
|
52
56
|
coloring: MeshEdgesColoring;
|
|
53
|
-
width:
|
|
57
|
+
width: EdgeWidth;
|
|
54
58
|
}
|
|
55
59
|
|
|
56
60
|
interface MeshCellsStyle {
|
|
@@ -70,8 +74,8 @@ interface MeshPolyhedraStyle {
|
|
|
70
74
|
|
|
71
75
|
function meshPointsDefaultStyle(
|
|
72
76
|
visibility: Visibility = POINTS_DEFAULT_VISIBILITY,
|
|
73
|
-
size:
|
|
74
|
-
constant:
|
|
77
|
+
size: PointSize = POINTS_DEFAULT_SIZE,
|
|
78
|
+
constant: ColorRGBA = POINTS_DEFAULT_COLOR,
|
|
75
79
|
): MeshPointsStyle {
|
|
76
80
|
return {
|
|
77
81
|
visibility,
|
|
@@ -86,8 +90,8 @@ function meshPointsDefaultStyle(
|
|
|
86
90
|
|
|
87
91
|
function meshEdgesDefaultStyle(
|
|
88
92
|
visibility: Visibility = EDGES_DEFAULT_VISIBILITY,
|
|
89
|
-
width:
|
|
90
|
-
constant:
|
|
93
|
+
width: EdgeWidth = EDGES_DEFAULT_WIDTH,
|
|
94
|
+
constant: ColorRGBA = EDGES_DEFAULT_COLOR,
|
|
91
95
|
): MeshEdgesStyle {
|
|
92
96
|
return {
|
|
93
97
|
visibility,
|
|
@@ -103,7 +107,7 @@ function meshEdgesDefaultStyle(
|
|
|
103
107
|
|
|
104
108
|
function meshCellsDefaultStyle(
|
|
105
109
|
visibility: Visibility = CELLS_DEFAULT_VISIBILITY,
|
|
106
|
-
constant:
|
|
110
|
+
constant: ColorRGBA = CELLS_DEFAULT_COLOR,
|
|
107
111
|
): MeshCellsStyle {
|
|
108
112
|
return {
|
|
109
113
|
visibility,
|
|
@@ -119,7 +123,7 @@ function meshCellsDefaultStyle(
|
|
|
119
123
|
|
|
120
124
|
function meshPolygonsDefaultStyle(
|
|
121
125
|
visibility: Visibility = POLYGONS_DEFAULT_VISIBILITY,
|
|
122
|
-
constant:
|
|
126
|
+
constant: ColorRGBA = POLYGONS_DEFAULT_COLOR,
|
|
123
127
|
): MeshPolygonsStyle {
|
|
124
128
|
return {
|
|
125
129
|
visibility,
|
|
@@ -135,7 +139,7 @@ function meshPolygonsDefaultStyle(
|
|
|
135
139
|
|
|
136
140
|
function meshPolyhedraDefaultStyle(
|
|
137
141
|
visibility: Visibility = POLYHEDRA_DEFAULT_VISIBILITY,
|
|
138
|
-
constant:
|
|
142
|
+
constant: ColorRGBA = POLYHEDRA_DEFAULT_COLOR,
|
|
139
143
|
): MeshPolyhedraStyle {
|
|
140
144
|
return {
|
|
141
145
|
visibility,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
meshPolygonsDefaultStyle,
|
|
11
11
|
meshPolyhedraDefaultStyle,
|
|
12
12
|
} from "./mesh_components";
|
|
13
|
-
import type { Visibility } from "@
|
|
13
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
14
14
|
|
|
15
15
|
interface PointSetStyle {
|
|
16
16
|
visibility: Visibility;
|
|
@@ -14,12 +14,16 @@ import {
|
|
|
14
14
|
LINES_DEFAULT_VISIBILITY,
|
|
15
15
|
POINTS_DEFAULT_SIZE,
|
|
16
16
|
POINTS_DEFAULT_VISIBILITY,
|
|
17
|
-
type RGBAColor,
|
|
18
17
|
SURFACES_DEFAULT_ACTIVE_COLORING,
|
|
19
18
|
SURFACES_DEFAULT_COLOR,
|
|
20
19
|
SURFACES_DEFAULT_VISIBILITY,
|
|
21
20
|
} from "./constants";
|
|
22
|
-
import type {
|
|
21
|
+
import type {
|
|
22
|
+
ColorRGBA,
|
|
23
|
+
EdgeWidth,
|
|
24
|
+
PointSize,
|
|
25
|
+
Visibility,
|
|
26
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
23
27
|
|
|
24
28
|
function emptyAttributeConfig(): AttributeConfig {
|
|
25
29
|
return { name: undefined, storedConfigs: {} };
|
|
@@ -59,17 +63,17 @@ interface ModelBlocksStyle {
|
|
|
59
63
|
|
|
60
64
|
interface ModelPointsStyle {
|
|
61
65
|
visibility: Visibility;
|
|
62
|
-
size:
|
|
66
|
+
size: PointSize;
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
interface ModelEdgesStyle {
|
|
66
70
|
visibility: Visibility;
|
|
67
|
-
width:
|
|
71
|
+
width: EdgeWidth;
|
|
68
72
|
}
|
|
69
73
|
|
|
70
74
|
function modelCornersDefaultStyle(
|
|
71
75
|
visibility: Visibility = CORNERS_DEFAULT_VISIBILITY,
|
|
72
|
-
constant:
|
|
76
|
+
constant: ColorRGBA = CORNERS_DEFAULT_COLOR,
|
|
73
77
|
): ModelCornersStyle {
|
|
74
78
|
return {
|
|
75
79
|
visibility,
|
|
@@ -83,7 +87,7 @@ function modelCornersDefaultStyle(
|
|
|
83
87
|
|
|
84
88
|
function modelLinesDefaultStyle(
|
|
85
89
|
visibility: Visibility = LINES_DEFAULT_VISIBILITY,
|
|
86
|
-
constant:
|
|
90
|
+
constant: ColorRGBA = LINES_DEFAULT_COLOR,
|
|
87
91
|
): ModelLinesStyle {
|
|
88
92
|
return {
|
|
89
93
|
visibility,
|
|
@@ -98,7 +102,7 @@ function modelLinesDefaultStyle(
|
|
|
98
102
|
|
|
99
103
|
function modelSurfacesDefaultStyle(
|
|
100
104
|
visibility: Visibility = SURFACES_DEFAULT_VISIBILITY,
|
|
101
|
-
constant:
|
|
105
|
+
constant: ColorRGBA = SURFACES_DEFAULT_COLOR,
|
|
102
106
|
): ModelSurfacesStyle {
|
|
103
107
|
return {
|
|
104
108
|
visibility,
|
|
@@ -113,7 +117,7 @@ function modelSurfacesDefaultStyle(
|
|
|
113
117
|
|
|
114
118
|
function modelBlocksDefaultStyle(
|
|
115
119
|
visibility: Visibility = BLOCKS_DEFAULT_VISIBILITY,
|
|
116
|
-
constant:
|
|
120
|
+
constant: ColorRGBA = BLOCKS_DEFAULT_COLOR,
|
|
117
121
|
): ModelBlocksStyle {
|
|
118
122
|
return {
|
|
119
123
|
visibility,
|
|
@@ -128,14 +132,14 @@ function modelBlocksDefaultStyle(
|
|
|
128
132
|
|
|
129
133
|
function modelPointsDefaultStyle(
|
|
130
134
|
visibility: Visibility = POINTS_DEFAULT_VISIBILITY,
|
|
131
|
-
size:
|
|
135
|
+
size: PointSize = POINTS_DEFAULT_SIZE,
|
|
132
136
|
): ModelPointsStyle {
|
|
133
137
|
return { visibility, size };
|
|
134
138
|
}
|
|
135
139
|
|
|
136
140
|
function modelEdgesDefaultStyle(
|
|
137
141
|
visibility: Visibility = EDGES_DEFAULT_VISIBILITY,
|
|
138
|
-
width:
|
|
142
|
+
width: EdgeWidth = EDGES_DEFAULT_WIDTH,
|
|
139
143
|
): ModelEdgesStyle {
|
|
140
144
|
return { visibility, width };
|
|
141
145
|
}
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
modelPointsDefaultStyle,
|
|
18
18
|
modelSurfacesDefaultStyle,
|
|
19
19
|
} from "./model_components";
|
|
20
|
-
import type { Visibility } from "@
|
|
20
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
21
21
|
|
|
22
22
|
interface ModelWithoutBlocksStyle {
|
|
23
23
|
visibility: Visibility;
|
|
@@ -4,9 +4,11 @@ import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schem
|
|
|
4
4
|
import { consola } from "consola";
|
|
5
5
|
|
|
6
6
|
// Local imports
|
|
7
|
-
import type { DataId, GeodeObjectType, GeodeObjectTyped } from "@ogw_front/types/identifiers";
|
|
8
7
|
import { type LegacyDataId, fromLegacyDataId } from "@ogw_front/utils/legacy_data_id";
|
|
9
8
|
import { type NewDataItem, useDataStore } from "@ogw_front/stores/data";
|
|
9
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
10
|
+
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
11
|
+
import type { GeodeObjectTyped } from "@ogw_front/types/identifiers";
|
|
10
12
|
import { useBackStore } from "@ogw_front/stores/back";
|
|
11
13
|
import { useDataStyleStore } from "@ogw_front/stores/data_style";
|
|
12
14
|
import { useFeedbackStore } from "@ogw_front/stores/feedback";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DataId
|
|
1
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
2
|
+
import type { DataIdentified } from "@ogw_front/types/identifiers";
|
|
2
3
|
|
|
3
4
|
// Temporary: the back-end, the viewer and the projects saved before data_id existed still name the data id `id`
|
|
4
5
|
type LegacyDataId<Row extends DataIdentified> = Omit<Row, "data_id"> & { id: DataId };
|