@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LineId, ModelId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
4
4
|
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
5
5
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
@@ -15,12 +15,12 @@ export function useModelLinesColor(): {
|
|
|
15
15
|
setModelLinesColor: (
|
|
16
16
|
modelId: ModelId,
|
|
17
17
|
lines_ids: LineId[],
|
|
18
|
-
color:
|
|
18
|
+
color: ColorRGBA | undefined,
|
|
19
19
|
activeColoring?: string,
|
|
20
20
|
collectionId?: string,
|
|
21
21
|
) => Promise<unknown>;
|
|
22
22
|
modelLineColoring: (modelId: ModelId, line_id?: LineId) => StyleValues;
|
|
23
|
-
modelLineColor: (modelId: ModelId, line_id?: LineId) =>
|
|
23
|
+
modelLineColor: (modelId: ModelId, line_id?: LineId) => ColorRGBA | undefined;
|
|
24
24
|
modelLineActiveColoring: (modelId: ModelId, line_id?: LineId) => unknown;
|
|
25
25
|
setModelLinesActiveColoring: (
|
|
26
26
|
modelId: ModelId,
|
|
@@ -40,15 +40,15 @@ export function useModelLinesColor(): {
|
|
|
40
40
|
return modelLinesCommonStyle.modelLineStyle(modelId, line_id).coloring as StyleValues;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function modelLineColor(modelId: ModelId, line_id?: LineId):
|
|
43
|
+
function modelLineColor(modelId: ModelId, line_id?: LineId): ColorRGBA | undefined {
|
|
44
44
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
45
|
-
return modelLineColoring(modelId, line_id).constant as
|
|
45
|
+
return modelLineColoring(modelId, line_id).constant as ColorRGBA | undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
async function setModelLinesColor(
|
|
49
49
|
modelId: ModelId,
|
|
50
50
|
lines_ids: LineId[],
|
|
51
|
-
color:
|
|
51
|
+
color: ColorRGBA | undefined,
|
|
52
52
|
activeColoring = "constant",
|
|
53
53
|
collectionId?: string,
|
|
54
54
|
): Promise<unknown> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import type { LineId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
3
3
|
import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
|
|
4
4
|
|
|
5
5
|
interface ColorGroup {
|
|
6
|
-
color:
|
|
6
|
+
color: ColorRGBA | undefined;
|
|
7
7
|
lines_ids: LineId[];
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// oxlint-disable eslint/max-lines
|
|
2
2
|
import type {
|
|
3
3
|
AttributeColorMap,
|
|
4
|
-
AttributeItem,
|
|
5
|
-
AttributeName,
|
|
6
4
|
AttributeRange,
|
|
7
|
-
AttributeRangeMaximum,
|
|
8
|
-
AttributeRangeMinimum,
|
|
9
5
|
AttributeTimeStep,
|
|
10
6
|
} from "@ogw_front/types/attribute";
|
|
11
7
|
import type {
|
|
@@ -14,8 +10,15 @@ import type {
|
|
|
14
10
|
AttributeStoredConfig,
|
|
15
11
|
ValidAttributeInput,
|
|
16
12
|
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
17
|
-
import
|
|
13
|
+
import type {
|
|
14
|
+
AttributeItem,
|
|
15
|
+
AttributeName,
|
|
16
|
+
AttributeRangeMaximum,
|
|
17
|
+
AttributeRangeMinimum,
|
|
18
|
+
ColorRGBA,
|
|
19
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
18
20
|
import type { LineId, ModelId } from "@ogw_front/types/identifiers";
|
|
21
|
+
import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
|
|
19
22
|
import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
|
|
20
23
|
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
21
24
|
// Third party imports
|
|
@@ -83,11 +86,11 @@ interface UseModelLinesEdgeAttributeReturn {
|
|
|
83
86
|
lineIds: LineId[],
|
|
84
87
|
colorMap: AttributeColorMap | undefined,
|
|
85
88
|
) => Promise<unknown>;
|
|
86
|
-
modelLinesEdgeAttributeNoDataColor: (modelId: ModelId, lineId?: LineId) =>
|
|
89
|
+
modelLinesEdgeAttributeNoDataColor: (modelId: ModelId, lineId?: LineId) => ColorRGBA;
|
|
87
90
|
setModelLinesEdgeAttributeNoDataColor: (
|
|
88
91
|
modelId: ModelId,
|
|
89
92
|
lineIds: LineId[],
|
|
90
|
-
no_data_color:
|
|
93
|
+
no_data_color: ColorRGBA,
|
|
91
94
|
) => Promise<unknown>;
|
|
92
95
|
}
|
|
93
96
|
|
|
@@ -171,7 +174,7 @@ function useModelLinesEdgeAttributeGetters(
|
|
|
171
174
|
const storedConfig = modelLinesEdgeAttributeStoredConfig(modelId, lineId, name, item);
|
|
172
175
|
return storedConfig.colorMap;
|
|
173
176
|
}
|
|
174
|
-
function modelLinesEdgeAttributeNoDataColor(modelId: ModelId, lineId?: LineId):
|
|
177
|
+
function modelLinesEdgeAttributeNoDataColor(modelId: ModelId, lineId?: LineId): ColorRGBA {
|
|
175
178
|
const name = modelLinesEdgeAttributeName(modelId, lineId);
|
|
176
179
|
const item = modelLinesEdgeAttributeItem(modelId, lineId);
|
|
177
180
|
const storedConfig = modelLinesEdgeAttributeStoredConfig(modelId, lineId, name, item);
|
|
@@ -395,7 +398,7 @@ function useModelLinesEdgeAttribute(): UseModelLinesEdgeAttributeReturn {
|
|
|
395
398
|
async function setModelLinesEdgeAttributeNoDataColor(
|
|
396
399
|
modelId: ModelId,
|
|
397
400
|
lineIds: LineId[],
|
|
398
|
-
no_data_color:
|
|
401
|
+
no_data_color: ColorRGBA,
|
|
399
402
|
): Promise<unknown> {
|
|
400
403
|
const name = modelLinesEdgeAttributeName(modelId, lineIds[0]);
|
|
401
404
|
const item = modelLinesEdgeAttributeItem(modelId, lineIds[0]);
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// oxlint-disable eslint/max-lines
|
|
2
2
|
import type {
|
|
3
3
|
AttributeColorMap,
|
|
4
|
-
AttributeItem,
|
|
5
|
-
AttributeName,
|
|
6
4
|
AttributeRange,
|
|
7
|
-
AttributeRangeMaximum,
|
|
8
|
-
AttributeRangeMinimum,
|
|
9
5
|
AttributeTimeStep,
|
|
10
6
|
} from "@ogw_front/types/attribute";
|
|
11
7
|
import type {
|
|
@@ -14,8 +10,15 @@ import type {
|
|
|
14
10
|
AttributeStoredConfig,
|
|
15
11
|
ValidAttributeInput,
|
|
16
12
|
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
17
|
-
import
|
|
13
|
+
import type {
|
|
14
|
+
AttributeItem,
|
|
15
|
+
AttributeName,
|
|
16
|
+
AttributeRangeMaximum,
|
|
17
|
+
AttributeRangeMinimum,
|
|
18
|
+
ColorRGBA,
|
|
19
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
18
20
|
import type { LineId, ModelId } from "@ogw_front/types/identifiers";
|
|
21
|
+
import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
|
|
19
22
|
import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
|
|
20
23
|
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
21
24
|
// Third party imports
|
|
@@ -83,11 +86,11 @@ interface UseModelLinesVertexAttributeReturn {
|
|
|
83
86
|
lineIds: LineId[],
|
|
84
87
|
colorMap: AttributeColorMap | undefined,
|
|
85
88
|
) => Promise<unknown>;
|
|
86
|
-
modelLinesVertexAttributeNoDataColor: (modelId: ModelId, lineId?: LineId) =>
|
|
89
|
+
modelLinesVertexAttributeNoDataColor: (modelId: ModelId, lineId?: LineId) => ColorRGBA;
|
|
87
90
|
setModelLinesVertexAttributeNoDataColor: (
|
|
88
91
|
modelId: ModelId,
|
|
89
92
|
lineIds: LineId[],
|
|
90
|
-
no_data_color:
|
|
93
|
+
no_data_color: ColorRGBA,
|
|
91
94
|
) => Promise<unknown>;
|
|
92
95
|
}
|
|
93
96
|
|
|
@@ -172,7 +175,7 @@ function useModelLinesVertexAttributeGetters(
|
|
|
172
175
|
const storedConfig = modelLinesVertexAttributeStoredConfig(modelId, lineId, name, item);
|
|
173
176
|
return storedConfig.colorMap;
|
|
174
177
|
}
|
|
175
|
-
function modelLinesVertexAttributeNoDataColor(modelId: ModelId, lineId?: LineId):
|
|
178
|
+
function modelLinesVertexAttributeNoDataColor(modelId: ModelId, lineId?: LineId): ColorRGBA {
|
|
176
179
|
const name = modelLinesVertexAttributeName(modelId, lineId);
|
|
177
180
|
const item = modelLinesVertexAttributeItem(modelId, lineId);
|
|
178
181
|
const storedConfig = modelLinesVertexAttributeStoredConfig(modelId, lineId, name, item);
|
|
@@ -396,7 +399,7 @@ function useModelLinesVertexAttribute(): UseModelLinesVertexAttributeReturn {
|
|
|
396
399
|
async function setModelLinesVertexAttributeNoDataColor(
|
|
397
400
|
modelId: ModelId,
|
|
398
401
|
lineIds: LineId[],
|
|
399
|
-
no_data_color:
|
|
402
|
+
no_data_color: ColorRGBA,
|
|
400
403
|
): Promise<unknown> {
|
|
401
404
|
const name = modelLinesVertexAttributeName(modelId, lineIds[0]);
|
|
402
405
|
const item = modelLinesVertexAttributeItem(modelId, lineIds[0]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LineId, ModelId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { Visibility } from "@
|
|
2
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
import { useModelCommonStyle } from "@ogw_internal/stores/data_style/model/common";
|
|
4
4
|
import { useModelLinesCommonStyle } from "./common";
|
|
5
5
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
// oxlint-disable eslint/max-lines
|
|
2
|
+
import type { AttributeColorMap, AttributeRange } from "@ogw_front/types/attribute";
|
|
2
3
|
import type {
|
|
3
|
-
AttributeColorMap,
|
|
4
4
|
AttributeItem,
|
|
5
5
|
AttributeName,
|
|
6
|
-
AttributeRange,
|
|
7
6
|
AttributeRangeMaximum,
|
|
8
7
|
AttributeRangeMinimum,
|
|
9
|
-
|
|
8
|
+
ColorRGBA,
|
|
9
|
+
PointSize,
|
|
10
|
+
Visibility,
|
|
11
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
10
12
|
import type {
|
|
11
13
|
AttributeState,
|
|
12
14
|
AttributeStoredConfig,
|
|
@@ -15,9 +17,7 @@ import {
|
|
|
15
17
|
POINTS_DEFAULT_COLOR,
|
|
16
18
|
POINTS_DEFAULT_SIZE,
|
|
17
19
|
POINTS_DEFAULT_VISIBILITY,
|
|
18
|
-
type RGBAColor,
|
|
19
20
|
} from "@ogw_front/utils/default_styles/constants";
|
|
20
|
-
import type { Size, Visibility } from "@ogw_front/types/style";
|
|
21
21
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
22
22
|
import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
|
|
23
23
|
import { getRGBPointsFromPreset } from "@ogw_front/utils/colormap";
|
|
@@ -51,10 +51,10 @@ type PointsRequestSchema =
|
|
|
51
51
|
|
|
52
52
|
interface PointsStyle {
|
|
53
53
|
visibility?: Visibility;
|
|
54
|
-
size?:
|
|
54
|
+
size?: PointSize;
|
|
55
55
|
coloring?: {
|
|
56
56
|
active?: string;
|
|
57
|
-
constant?:
|
|
57
|
+
constant?: ColorRGBA;
|
|
58
58
|
vertex?: AttributeState;
|
|
59
59
|
};
|
|
60
60
|
}
|
|
@@ -103,11 +103,11 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
103
103
|
return pointsStyle(modelId, componentId).visibility ?? POINTS_DEFAULT_VISIBILITY;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
function pointsSize(modelId: ModelId, componentId?: string):
|
|
106
|
+
function pointsSize(modelId: ModelId, componentId?: string): PointSize {
|
|
107
107
|
return pointsStyle(modelId, componentId).size ?? POINTS_DEFAULT_SIZE;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
function pointsColor(modelId: ModelId, componentId?: string):
|
|
110
|
+
function pointsColor(modelId: ModelId, componentId?: string): ColorRGBA {
|
|
111
111
|
return pointsStyle(modelId, componentId).coloring?.constant ?? POINTS_DEFAULT_COLOR;
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -153,7 +153,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
153
153
|
return storedConfig(modelId, componentId).colorMap;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
function vertexAttributeNoDataColor(modelId: ModelId, componentId?: string):
|
|
156
|
+
function vertexAttributeNoDataColor(modelId: ModelId, componentId?: string): ColorRGBA {
|
|
157
157
|
return storedConfig(modelId, componentId).no_data_color;
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -213,7 +213,11 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
213
213
|
return result;
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
-
async function setSize(
|
|
216
|
+
async function setSize(
|
|
217
|
+
modelId: ModelId,
|
|
218
|
+
componentIds: string[],
|
|
219
|
+
size: PointSize,
|
|
220
|
+
): Promise<unknown> {
|
|
217
221
|
const result = await requestPoints(modelId, componentIds, schemas.size, {
|
|
218
222
|
size,
|
|
219
223
|
style: { size },
|
|
@@ -224,7 +228,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
224
228
|
async function setColor(
|
|
225
229
|
modelId: ModelId,
|
|
226
230
|
componentIds: string[],
|
|
227
|
-
color:
|
|
231
|
+
color: ColorRGBA,
|
|
228
232
|
): Promise<unknown> {
|
|
229
233
|
const result = await requestPoints(modelId, componentIds, schemas.color, {
|
|
230
234
|
color,
|
|
@@ -339,7 +343,7 @@ function useModelComponentPointsStyle(type: PointsComponentType) {
|
|
|
339
343
|
async function setVertexAttributeNoDataColor(
|
|
340
344
|
modelId: ModelId,
|
|
341
345
|
componentIds: string[],
|
|
342
|
-
no_data_color:
|
|
346
|
+
no_data_color: ColorRGBA,
|
|
343
347
|
): Promise<unknown> {
|
|
344
348
|
await mutateStoredConfig(modelId, componentIds, { no_data_color });
|
|
345
349
|
const result = await applyVertexAttribute(modelId, componentIds);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Local imports
|
|
2
|
-
import type {
|
|
2
|
+
import type { PointSize, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
4
4
|
import { useModelPointsCommonStyle } from "./common";
|
|
5
5
|
import { useModelPointsSizeStyle } from "./size";
|
|
@@ -31,7 +31,7 @@ export function useModelPointsStyle(): {
|
|
|
31
31
|
),
|
|
32
32
|
whenDefined(
|
|
33
33
|
// oxlint-disable-next-line no-unsafe-type-assertion -- points style values are dynamically typed at runtime.
|
|
34
|
-
style.size as
|
|
34
|
+
style.size as PointSize | undefined,
|
|
35
35
|
async (size) => {
|
|
36
36
|
const applied = await modelPointsSizeStyle.setModelPointsSize(modelId, size);
|
|
37
37
|
return applied;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
useModelComponentPointsStyle,
|
|
8
8
|
} from "@ogw_internal/stores/data_style/model/points/component";
|
|
9
9
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
10
|
-
import type {
|
|
10
|
+
import type { PointSize } from "@geode/opengeodeweb-viewer/schema_types";
|
|
11
11
|
import { useModelPointsCommonStyle } from "./common";
|
|
12
12
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
13
13
|
|
|
@@ -15,8 +15,8 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
15
15
|
const schema = viewer_schemas.opengeodeweb_viewer.model.points.size;
|
|
16
16
|
|
|
17
17
|
export function useModelPointsSizeStyle(): {
|
|
18
|
-
modelPointsSize: (modelId: ModelId) =>
|
|
19
|
-
setModelPointsSize: (modelId: ModelId, size:
|
|
18
|
+
modelPointsSize: (modelId: ModelId) => PointSize | undefined;
|
|
19
|
+
setModelPointsSize: (modelId: ModelId, size: PointSize) => Promise<unknown>;
|
|
20
20
|
} {
|
|
21
21
|
const viewerStore = useViewerStore();
|
|
22
22
|
const modelPointsCommonStyle = useModelPointsCommonStyle();
|
|
@@ -24,12 +24,12 @@ export function useModelPointsSizeStyle(): {
|
|
|
24
24
|
useModelComponentPointsStyle(type),
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
function modelPointsSize(modelId: ModelId):
|
|
27
|
+
function modelPointsSize(modelId: ModelId): PointSize | undefined {
|
|
28
28
|
// oxlint-disable-next-line no-unsafe-type-assertion -- points style values are dynamically typed at runtime.
|
|
29
|
-
return modelPointsCommonStyle.modelPointsStyle(modelId).size as
|
|
29
|
+
return modelPointsCommonStyle.modelPointsStyle(modelId).size as PointSize | undefined;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
async function setModelPointsSize(modelId: ModelId, size:
|
|
32
|
+
async function setModelPointsSize(modelId: ModelId, size: PointSize): Promise<unknown> {
|
|
33
33
|
const params = { id: modelId, size };
|
|
34
34
|
const result = await viewerStore.request(
|
|
35
35
|
{
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
useModelComponentPointsStyle,
|
|
8
8
|
} from "@ogw_internal/stores/data_style/model/points/component";
|
|
9
9
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
10
|
-
import type { Visibility } from "@
|
|
10
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
11
11
|
import { useModelPointsCommonStyle } from "./common";
|
|
12
12
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ModelId, SurfaceId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
4
4
|
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
5
5
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
@@ -15,12 +15,12 @@ export function useModelSurfacesColor(): {
|
|
|
15
15
|
setModelSurfacesColor: (
|
|
16
16
|
modelId: ModelId,
|
|
17
17
|
surfaces_ids: SurfaceId[],
|
|
18
|
-
color:
|
|
18
|
+
color: ColorRGBA | undefined,
|
|
19
19
|
activeColoring?: string,
|
|
20
20
|
collectionId?: string,
|
|
21
21
|
) => Promise<unknown>;
|
|
22
22
|
modelSurfaceColoring: (modelId: ModelId, surface_id?: SurfaceId) => StyleValues;
|
|
23
|
-
modelSurfaceColor: (modelId: ModelId, surface_id?: SurfaceId) =>
|
|
23
|
+
modelSurfaceColor: (modelId: ModelId, surface_id?: SurfaceId) => ColorRGBA | undefined;
|
|
24
24
|
modelSurfaceActiveColoring: (modelId: ModelId, surface_id?: SurfaceId) => unknown;
|
|
25
25
|
setModelSurfacesActiveColoring: (
|
|
26
26
|
modelId: ModelId,
|
|
@@ -40,15 +40,15 @@ export function useModelSurfacesColor(): {
|
|
|
40
40
|
return modelSurfacesCommonStyle.modelSurfaceStyle(modelId, surface_id).coloring as StyleValues;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function modelSurfaceColor(modelId: ModelId, surface_id?: SurfaceId):
|
|
43
|
+
function modelSurfaceColor(modelId: ModelId, surface_id?: SurfaceId): ColorRGBA | undefined {
|
|
44
44
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
45
|
-
return modelSurfaceColoring(modelId, surface_id).constant as
|
|
45
|
+
return modelSurfaceColoring(modelId, surface_id).constant as ColorRGBA | undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
async function setModelSurfacesColor(
|
|
49
49
|
modelId: ModelId,
|
|
50
50
|
surfaces_ids: SurfaceId[],
|
|
51
|
-
color:
|
|
51
|
+
color: ColorRGBA | undefined,
|
|
52
52
|
activeColoring = "constant",
|
|
53
53
|
collectionId?: string,
|
|
54
54
|
): Promise<unknown> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
2
2
|
import type { SurfaceId } from "@ogw_front/types/identifiers";
|
|
3
3
|
import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
|
|
4
4
|
|
|
5
5
|
interface ColorGroup {
|
|
6
|
-
color:
|
|
6
|
+
color: ColorRGBA | undefined;
|
|
7
7
|
surfaces_ids: SurfaceId[];
|
|
8
8
|
}
|
|
9
9
|
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// oxlint-disable eslint/max-lines
|
|
2
2
|
import type {
|
|
3
3
|
AttributeColorMap,
|
|
4
|
-
AttributeItem,
|
|
5
|
-
AttributeName,
|
|
6
4
|
AttributeRange,
|
|
7
|
-
AttributeRangeMaximum,
|
|
8
|
-
AttributeRangeMinimum,
|
|
9
5
|
AttributeTimeStep,
|
|
10
6
|
} from "@ogw_front/types/attribute";
|
|
11
7
|
import type {
|
|
@@ -14,8 +10,15 @@ import type {
|
|
|
14
10
|
AttributeStoredConfig,
|
|
15
11
|
ValidAttributeInput,
|
|
16
12
|
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
17
|
-
import
|
|
13
|
+
import type {
|
|
14
|
+
AttributeItem,
|
|
15
|
+
AttributeName,
|
|
16
|
+
AttributeRangeMaximum,
|
|
17
|
+
AttributeRangeMinimum,
|
|
18
|
+
ColorRGBA,
|
|
19
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
18
20
|
import type { ModelId, SurfaceId } from "@ogw_front/types/identifiers";
|
|
21
|
+
import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
|
|
19
22
|
import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
|
|
20
23
|
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
21
24
|
// Third party imports
|
|
@@ -87,11 +90,11 @@ interface UseModelSurfacesPolygonAttributeReturn {
|
|
|
87
90
|
surfaceIds: SurfaceId[],
|
|
88
91
|
colorMap: AttributeColorMap | undefined,
|
|
89
92
|
) => Promise<void>;
|
|
90
|
-
modelSurfacesPolygonAttributeNoDataColor: (modelId: ModelId, surfaceId?: SurfaceId) =>
|
|
93
|
+
modelSurfacesPolygonAttributeNoDataColor: (modelId: ModelId, surfaceId?: SurfaceId) => ColorRGBA;
|
|
91
94
|
setModelSurfacesPolygonAttributeNoDataColor: (
|
|
92
95
|
modelId: ModelId,
|
|
93
96
|
surfaceIds: SurfaceId[],
|
|
94
|
-
no_data_color:
|
|
97
|
+
no_data_color: ColorRGBA,
|
|
95
98
|
) => Promise<void>;
|
|
96
99
|
}
|
|
97
100
|
|
|
@@ -187,7 +190,7 @@ function useModelSurfacesPolygonAttributeGetters(
|
|
|
187
190
|
function modelSurfacesPolygonAttributeNoDataColor(
|
|
188
191
|
modelId: ModelId,
|
|
189
192
|
surfaceId?: SurfaceId,
|
|
190
|
-
):
|
|
193
|
+
): ColorRGBA {
|
|
191
194
|
const name = modelSurfacesPolygonAttributeName(modelId, surfaceId);
|
|
192
195
|
const item = modelSurfacesPolygonAttributeItem(modelId, surfaceId);
|
|
193
196
|
const storedConfig = modelSurfacesPolygonAttributeStoredConfig(modelId, surfaceId, name, item);
|
|
@@ -401,7 +404,7 @@ function useModelSurfacesPolygonAttribute(): UseModelSurfacesPolygonAttributeRet
|
|
|
401
404
|
async function setModelSurfacesPolygonAttributeNoDataColor(
|
|
402
405
|
modelId: ModelId,
|
|
403
406
|
surfaceIds: SurfaceId[],
|
|
404
|
-
no_data_color:
|
|
407
|
+
no_data_color: ColorRGBA,
|
|
405
408
|
): Promise<void> {
|
|
406
409
|
const name = modelSurfacesPolygonAttributeName(modelId, surfaceIds[0]);
|
|
407
410
|
const item = modelSurfacesPolygonAttributeItem(modelId, surfaceIds[0]);
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// oxlint-disable eslint/max-lines
|
|
2
2
|
import type {
|
|
3
3
|
AttributeColorMap,
|
|
4
|
-
AttributeItem,
|
|
5
|
-
AttributeName,
|
|
6
4
|
AttributeRange,
|
|
7
|
-
AttributeRangeMaximum,
|
|
8
|
-
AttributeRangeMinimum,
|
|
9
5
|
AttributeTimeStep,
|
|
10
6
|
} from "@ogw_front/types/attribute";
|
|
11
7
|
import type {
|
|
@@ -14,8 +10,15 @@ import type {
|
|
|
14
10
|
AttributeStoredConfig,
|
|
15
11
|
ValidAttributeInput,
|
|
16
12
|
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
17
|
-
import
|
|
13
|
+
import type {
|
|
14
|
+
AttributeItem,
|
|
15
|
+
AttributeName,
|
|
16
|
+
AttributeRangeMaximum,
|
|
17
|
+
AttributeRangeMinimum,
|
|
18
|
+
ColorRGBA,
|
|
19
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
18
20
|
import type { ModelId, SurfaceId } from "@ogw_front/types/identifiers";
|
|
21
|
+
import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
|
|
19
22
|
import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
|
|
20
23
|
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
21
24
|
// Third party imports
|
|
@@ -87,11 +90,11 @@ interface UseModelSurfacesVertexAttributeReturn {
|
|
|
87
90
|
surfaceIds: SurfaceId[],
|
|
88
91
|
colorMap: AttributeColorMap | undefined,
|
|
89
92
|
) => Promise<unknown>;
|
|
90
|
-
modelSurfacesVertexAttributeNoDataColor: (modelId: ModelId, surfaceId?: SurfaceId) =>
|
|
93
|
+
modelSurfacesVertexAttributeNoDataColor: (modelId: ModelId, surfaceId?: SurfaceId) => ColorRGBA;
|
|
91
94
|
setModelSurfacesVertexAttributeNoDataColor: (
|
|
92
95
|
modelId: ModelId,
|
|
93
96
|
surfaceIds: SurfaceId[],
|
|
94
|
-
no_data_color:
|
|
97
|
+
no_data_color: ColorRGBA,
|
|
95
98
|
) => Promise<unknown>;
|
|
96
99
|
}
|
|
97
100
|
|
|
@@ -187,7 +190,7 @@ function useModelSurfacesVertexAttributeGetters(
|
|
|
187
190
|
function modelSurfacesVertexAttributeNoDataColor(
|
|
188
191
|
modelId: ModelId,
|
|
189
192
|
surfaceId?: SurfaceId,
|
|
190
|
-
):
|
|
193
|
+
): ColorRGBA {
|
|
191
194
|
const name = modelSurfacesVertexAttributeName(modelId, surfaceId);
|
|
192
195
|
const item = modelSurfacesVertexAttributeItem(modelId, surfaceId);
|
|
193
196
|
const storedConfig = modelSurfacesVertexAttributeStoredConfig(modelId, surfaceId, name, item);
|
|
@@ -407,7 +410,7 @@ function useModelSurfacesVertexAttribute(): UseModelSurfacesVertexAttributeRetur
|
|
|
407
410
|
async function setModelSurfacesVertexAttributeNoDataColor(
|
|
408
411
|
modelId: ModelId,
|
|
409
412
|
surfaceIds: SurfaceId[],
|
|
410
|
-
no_data_color:
|
|
413
|
+
no_data_color: ColorRGBA,
|
|
411
414
|
): Promise<unknown> {
|
|
412
415
|
const name = modelSurfacesVertexAttributeName(modelId, surfaceIds[0]);
|
|
413
416
|
const item = modelSurfacesVertexAttributeItem(modelId, surfaceIds[0]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ModelId, SurfaceId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { Visibility } from "@
|
|
2
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
import { useModelCommonStyle } from "@ogw_internal/stores/data_style/model/common";
|
|
4
4
|
import { useModelSurfacesCommonStyle } from "./common";
|
|
5
5
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ComponentStyleFunctions, dispatchToComponentTypes } from "./visibility_dispatch";
|
|
2
2
|
import { MESH_COMPONENT_TYPES } from "@ogw_front/utils/default_styles";
|
|
3
3
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
4
|
-
import type { Visibility } from "@
|
|
4
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
5
5
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
6
6
|
import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
|
|
7
7
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { SceneFontFamily, SceneOrientationWidget, SceneStyle } from "./types";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
// Third party imports
|
|
4
4
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
5
5
|
|
|
6
6
|
// Local imports
|
|
7
|
+
import {
|
|
8
|
+
NO_VIEWER_MARKER,
|
|
9
|
+
viewerOrientationMarker,
|
|
10
|
+
} from "@ogw_front/composables/orientation_overlay";
|
|
11
|
+
import { consola } from "consola";
|
|
7
12
|
import { getDefaultSceneStyle } from "@ogw_front/utils/default_styles";
|
|
8
13
|
import { getTable } from "@ogw_internal/database/database";
|
|
14
|
+
import { toViewerColor } from "@ogw_front/composables/viewer_reset";
|
|
9
15
|
import { useDataStyleState } from "./state";
|
|
10
16
|
import { useHybridViewerStore } from "@ogw_front/stores/hybrid_viewer";
|
|
11
17
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
@@ -14,16 +20,10 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
14
20
|
const text_style_schema = viewer_schemas.opengeodeweb_viewer.viewer.set_text_style;
|
|
15
21
|
const orientation_widget_schema = viewer_schemas.opengeodeweb_viewer.viewer.set_orientation_widget;
|
|
16
22
|
|
|
17
|
-
// oxlint-disable-next-line id-length -- the viewer schema requires { r, g, b }
|
|
18
|
-
function toViewerColor(color: RGBAColor): { r: number; g: number; b: number } {
|
|
19
|
-
// oxlint-disable-next-line id-length -- the viewer schema requires { r, g, b }
|
|
20
|
-
return { r: color.red, g: color.green, b: color.blue };
|
|
21
|
-
}
|
|
22
|
-
|
|
23
23
|
// oxlint-disable-next-line max-lines-per-function
|
|
24
24
|
export function useSceneStyle(): {
|
|
25
|
-
setSceneBackgroundColor: (color:
|
|
26
|
-
setSceneTextColor: (color:
|
|
25
|
+
setSceneBackgroundColor: (color: ColorRGBA) => Promise<void>;
|
|
26
|
+
setSceneTextColor: (color: ColorRGBA) => Promise<unknown>;
|
|
27
27
|
setSceneFontFamily: (font_family: SceneFontFamily) => Promise<unknown>;
|
|
28
28
|
setSceneOrientationWidget: (marker: SceneOrientationWidget) => Promise<unknown>;
|
|
29
29
|
applySceneStyle: () => Promise<void>;
|
|
@@ -62,23 +62,35 @@ export function useSceneStyle(): {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
async function requestOrientationWidget(marker: SceneOrientationWidget): Promise<unknown> {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
// With the front overlay, the viewer hides its marker while the scene style keeps the choice
|
|
66
|
+
const viewerMarker = viewerOrientationMarker(marker);
|
|
67
|
+
try {
|
|
68
|
+
const result = await viewerStore.request(
|
|
69
|
+
{ schema: orientation_widget_schema, params: { marker: viewerMarker } },
|
|
70
|
+
{
|
|
71
|
+
response_function: async () => {
|
|
72
|
+
await saveSceneStyle({ orientation_widget: marker });
|
|
73
|
+
},
|
|
70
74
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
);
|
|
76
|
+
return result;
|
|
77
|
+
} catch (error) {
|
|
78
|
+
if (viewerMarker !== NO_VIEWER_MARKER) {
|
|
79
|
+
throw error;
|
|
80
|
+
}
|
|
81
|
+
// A viewer without the "none" marker keeps its own: the overlay still follows the user's choice
|
|
82
|
+
consola.warn("[OrientationOverlay] The viewer kept its orientation marker:", error);
|
|
83
|
+
await saveSceneStyle({ orientation_widget: marker });
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
74
86
|
}
|
|
75
87
|
|
|
76
|
-
async function setSceneBackgroundColor(color:
|
|
88
|
+
async function setSceneBackgroundColor(color: ColorRGBA): Promise<void> {
|
|
77
89
|
await hybridViewerStore.setBackgroundColor(toViewerColor(color));
|
|
78
90
|
await saveSceneStyle({ background_color: color });
|
|
79
91
|
}
|
|
80
92
|
|
|
81
|
-
async function setSceneTextColor(color:
|
|
93
|
+
async function setSceneTextColor(color: ColorRGBA): Promise<unknown> {
|
|
82
94
|
const result = await requestTextStyle({ ...sceneStyle.value.text, color });
|
|
83
95
|
return result;
|
|
84
96
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { AttributeName
|
|
2
|
-
import type {
|
|
1
|
+
import type { AttributeName } from "@geode/opengeodeweb-viewer/schema_types";
|
|
2
|
+
import type { AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
3
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
3
4
|
import { attributeArrayName } from "@ogw_front/utils/attributes";
|
|
4
5
|
import { useDataStyleState } from "./state";
|
|
5
6
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import type { ColorRGBA, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import type { DataIdentified } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
3
|
-
import type { Visibility } from "@ogw_front/types/style";
|
|
4
3
|
|
|
5
4
|
type StyleValues = Record<string, unknown>;
|
|
6
5
|
|
|
@@ -36,9 +35,9 @@ type SceneOrientationWidget = "axes" | "compass";
|
|
|
36
35
|
|
|
37
36
|
interface SceneStyle {
|
|
38
37
|
id: "scene";
|
|
39
|
-
background_color:
|
|
38
|
+
background_color: ColorRGBA;
|
|
40
39
|
text: {
|
|
41
|
-
color:
|
|
40
|
+
color: ColorRGBA;
|
|
42
41
|
font_family: SceneFontFamily;
|
|
43
42
|
};
|
|
44
43
|
orientation_widget: SceneOrientationWidget;
|