@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,18 +1,20 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
AttributeColorMap,
|
|
3
|
+
AttributeRange,
|
|
4
|
+
AttributeTimeStep,
|
|
5
|
+
} from "@ogw_front/types/attribute";
|
|
6
|
+
import type {
|
|
3
7
|
AttributeItem,
|
|
4
8
|
AttributeName,
|
|
5
|
-
AttributeRange,
|
|
6
9
|
AttributeRangeMaximum,
|
|
7
10
|
AttributeRangeMinimum,
|
|
8
|
-
|
|
9
|
-
} from "@
|
|
11
|
+
ColorRGBA,
|
|
12
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
10
13
|
import type {
|
|
11
14
|
AttributeStoredConfig,
|
|
12
15
|
ValidAttributeInput,
|
|
13
16
|
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
14
17
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
15
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
16
18
|
|
|
17
19
|
interface UseMeshPolyhedraVertexAttributeStyleReturn {
|
|
18
20
|
meshPolyhedraVertexAttributeName: (meshId: MeshId) => AttributeName | undefined;
|
|
@@ -41,10 +43,10 @@ interface UseMeshPolyhedraVertexAttributeStyleReturn {
|
|
|
41
43
|
meshId: MeshId,
|
|
42
44
|
colorMap: AttributeColorMap | undefined,
|
|
43
45
|
) => Promise<unknown>;
|
|
44
|
-
meshPolyhedraVertexAttributeNoDataColor: (meshId: MeshId) =>
|
|
46
|
+
meshPolyhedraVertexAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
45
47
|
setMeshPolyhedraVertexAttributeNoDataColor: (
|
|
46
48
|
meshId: MeshId,
|
|
47
|
-
no_data_color:
|
|
49
|
+
no_data_color: ColorRGBA,
|
|
48
50
|
) => Promise<unknown>;
|
|
49
51
|
}
|
|
50
52
|
export type { UseMeshPolyhedraVertexAttributeStyleReturn };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
+
import type { AttributeColorMap, AttributeRange } from "@ogw_front/types/attribute";
|
|
1
2
|
import type {
|
|
2
|
-
AttributeColorMap,
|
|
3
3
|
AttributeItem,
|
|
4
4
|
AttributeName,
|
|
5
|
-
|
|
6
|
-
} from "@
|
|
5
|
+
ColorRGBA,
|
|
6
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
7
7
|
import type {
|
|
8
8
|
AttributeState,
|
|
9
9
|
AttributeStoredConfig,
|
|
10
10
|
} from "@ogw_internal/stores/data_style/attribute_types";
|
|
11
11
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
12
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
13
12
|
import { defaultAttributeStoredConfig } from "@ogw_internal/stores/data_style/attribute_default";
|
|
14
13
|
|
|
15
14
|
// Local imports
|
|
@@ -89,7 +88,7 @@ function useMeshPolyhedraVertexAttributeConfig(): UseMeshPolyhedraVertexAttribut
|
|
|
89
88
|
interface UseMeshPolyhedraVertexAttributeConfigValuesReturn {
|
|
90
89
|
meshPolyhedraVertexAttributeRange: (meshId: MeshId) => AttributeRange;
|
|
91
90
|
meshPolyhedraVertexAttributeColorMap: (meshId: MeshId) => AttributeColorMap | undefined;
|
|
92
|
-
meshPolyhedraVertexAttributeNoDataColor: (meshId: MeshId) =>
|
|
91
|
+
meshPolyhedraVertexAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
function useMeshPolyhedraVertexAttributeConfigValues(): UseMeshPolyhedraVertexAttributeConfigValuesReturn {
|
|
@@ -110,7 +109,7 @@ function useMeshPolyhedraVertexAttributeConfigValues(): UseMeshPolyhedraVertexAt
|
|
|
110
109
|
const storedConfig = meshPolyhedraVertexAttributeStoredConfig(meshId, name, item);
|
|
111
110
|
return storedConfig.colorMap;
|
|
112
111
|
}
|
|
113
|
-
function meshPolyhedraVertexAttributeNoDataColor(meshId: MeshId):
|
|
112
|
+
function meshPolyhedraVertexAttributeNoDataColor(meshId: MeshId): ColorRGBA {
|
|
114
113
|
const name = meshPolyhedraVertexAttributeName(meshId);
|
|
115
114
|
const item = meshPolyhedraVertexAttributeItem(meshId);
|
|
116
115
|
const storedConfig = meshPolyhedraVertexAttributeStoredConfig(meshId, name, item);
|
|
@@ -3,7 +3,7 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed
|
|
|
3
3
|
|
|
4
4
|
// Local imports
|
|
5
5
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
6
|
-
import type { Visibility } from "@
|
|
6
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
7
7
|
import { useMeshPolyhedraCommonStyle } from "./common";
|
|
8
8
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BlockId, 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";
|
|
@@ -13,11 +13,11 @@ const schema = viewer_schemas.opengeodeweb_viewer.model.blocks.color;
|
|
|
13
13
|
|
|
14
14
|
export function useModelBlocksColor(): {
|
|
15
15
|
modelBlockColoring: (modelId: ModelId, block_id?: BlockId) => StyleValues;
|
|
16
|
-
modelBlockColor: (modelId: ModelId, block_id?: BlockId) =>
|
|
16
|
+
modelBlockColor: (modelId: ModelId, block_id?: BlockId) => ColorRGBA | undefined;
|
|
17
17
|
setModelBlocksColor: (
|
|
18
18
|
modelId: ModelId,
|
|
19
19
|
blocks_ids: BlockId[],
|
|
20
|
-
color:
|
|
20
|
+
color: ColorRGBA | undefined,
|
|
21
21
|
activeColoring?: string,
|
|
22
22
|
collectionId?: string,
|
|
23
23
|
) => Promise<unknown>;
|
|
@@ -40,15 +40,15 @@ export function useModelBlocksColor(): {
|
|
|
40
40
|
return modelBlocksCommonStyle.modelBlockStyle(modelId, block_id).coloring as StyleValues;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function modelBlockColor(modelId: ModelId, block_id?: BlockId):
|
|
43
|
+
function modelBlockColor(modelId: ModelId, block_id?: BlockId): ColorRGBA | undefined {
|
|
44
44
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
45
|
-
return modelBlockColoring(modelId, block_id).constant as
|
|
45
|
+
return modelBlockColoring(modelId, block_id).constant as ColorRGBA | undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
async function setModelBlocksColor(
|
|
49
49
|
modelId: ModelId,
|
|
50
50
|
blocks_ids: BlockId[],
|
|
51
|
-
color:
|
|
51
|
+
color: ColorRGBA | undefined,
|
|
52
52
|
activeColoring = "constant",
|
|
53
53
|
collectionId?: string,
|
|
54
54
|
): Promise<unknown> {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { BlockId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
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
|
blocks_ids: BlockId[];
|
|
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";
|
|
13
|
+
import type {
|
|
14
|
+
AttributeItem,
|
|
15
|
+
AttributeName,
|
|
16
|
+
AttributeRangeMaximum,
|
|
17
|
+
AttributeRangeMinimum,
|
|
18
|
+
ColorRGBA,
|
|
19
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
17
20
|
import type { BlockId, ModelId } from "@ogw_front/types/identifiers";
|
|
18
|
-
import { DEFAULT_NO_DATA_COLOR
|
|
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 UseModelBlocksPolyhedronAttributeReturn {
|
|
|
87
90
|
blockIds: BlockId[],
|
|
88
91
|
colorMap: AttributeColorMap | undefined,
|
|
89
92
|
) => Promise<boolean>;
|
|
90
|
-
modelBlocksPolyhedronAttributeNoDataColor: (modelId: ModelId, blockId?: BlockId) =>
|
|
93
|
+
modelBlocksPolyhedronAttributeNoDataColor: (modelId: ModelId, blockId?: BlockId) => ColorRGBA;
|
|
91
94
|
setModelBlocksPolyhedronAttributeNoDataColor: (
|
|
92
95
|
modelId: ModelId,
|
|
93
96
|
blockIds: BlockId[],
|
|
94
|
-
no_data_color:
|
|
97
|
+
no_data_color: ColorRGBA,
|
|
95
98
|
) => Promise<boolean>;
|
|
96
99
|
}
|
|
97
100
|
|
|
@@ -182,7 +185,7 @@ function useModelBlocksPolyhedronAttributeGetters(
|
|
|
182
185
|
function modelBlocksPolyhedronAttributeNoDataColor(
|
|
183
186
|
modelId: ModelId,
|
|
184
187
|
blockId?: BlockId,
|
|
185
|
-
):
|
|
188
|
+
): ColorRGBA {
|
|
186
189
|
const name = modelBlocksPolyhedronAttributeName(modelId, blockId);
|
|
187
190
|
const item = modelBlocksPolyhedronAttributeItem(modelId, blockId);
|
|
188
191
|
const storedConfig = modelBlocksPolyhedronAttributeStoredConfig(modelId, blockId, name, item);
|
|
@@ -416,7 +419,7 @@ function useModelBlocksPolyhedronAttribute(): UseModelBlocksPolyhedronAttributeR
|
|
|
416
419
|
async function setModelBlocksPolyhedronAttributeNoDataColor(
|
|
417
420
|
modelId: ModelId,
|
|
418
421
|
blockIds: BlockId[],
|
|
419
|
-
no_data_color:
|
|
422
|
+
no_data_color: ColorRGBA,
|
|
420
423
|
): Promise<boolean> {
|
|
421
424
|
const name = modelBlocksPolyhedronAttributeName(modelId, blockIds[0]);
|
|
422
425
|
const item = modelBlocksPolyhedronAttributeItem(modelId, blockIds[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";
|
|
13
|
+
import type {
|
|
14
|
+
AttributeItem,
|
|
15
|
+
AttributeName,
|
|
16
|
+
AttributeRangeMaximum,
|
|
17
|
+
AttributeRangeMinimum,
|
|
18
|
+
ColorRGBA,
|
|
19
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
17
20
|
import type { BlockId, ModelId } from "@ogw_front/types/identifiers";
|
|
18
|
-
import { DEFAULT_NO_DATA_COLOR
|
|
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
|
|
@@ -86,11 +89,11 @@ interface UseModelBlocksVertexAttributeReturn {
|
|
|
86
89
|
blockIds: BlockId[],
|
|
87
90
|
colorMap: AttributeColorMap | undefined,
|
|
88
91
|
) => Promise<unknown>;
|
|
89
|
-
modelBlocksVertexAttributeNoDataColor: (modelId: ModelId, blockId?: BlockId) =>
|
|
92
|
+
modelBlocksVertexAttributeNoDataColor: (modelId: ModelId, blockId?: BlockId) => ColorRGBA;
|
|
90
93
|
setModelBlocksVertexAttributeNoDataColor: (
|
|
91
94
|
modelId: ModelId,
|
|
92
95
|
blockIds: BlockId[],
|
|
93
|
-
no_data_color:
|
|
96
|
+
no_data_color: ColorRGBA,
|
|
94
97
|
) => Promise<unknown>;
|
|
95
98
|
}
|
|
96
99
|
|
|
@@ -175,7 +178,7 @@ function useModelBlocksVertexAttributeGetters(
|
|
|
175
178
|
const storedConfig = modelBlocksVertexAttributeStoredConfig(modelId, blockId, name, item);
|
|
176
179
|
return storedConfig.colorMap;
|
|
177
180
|
}
|
|
178
|
-
function modelBlocksVertexAttributeNoDataColor(modelId: ModelId, blockId?: BlockId):
|
|
181
|
+
function modelBlocksVertexAttributeNoDataColor(modelId: ModelId, blockId?: BlockId): ColorRGBA {
|
|
179
182
|
const name = modelBlocksVertexAttributeName(modelId, blockId);
|
|
180
183
|
const item = modelBlocksVertexAttributeItem(modelId, blockId);
|
|
181
184
|
const storedConfig = modelBlocksVertexAttributeStoredConfig(modelId, blockId, name, item);
|
|
@@ -401,7 +404,7 @@ function useModelBlocksVertexAttribute(): UseModelBlocksVertexAttributeReturn {
|
|
|
401
404
|
async function setModelBlocksVertexAttributeNoDataColor(
|
|
402
405
|
modelId: ModelId,
|
|
403
406
|
blockIds: BlockId[],
|
|
404
|
-
no_data_color:
|
|
407
|
+
no_data_color: ColorRGBA,
|
|
405
408
|
): Promise<unknown> {
|
|
406
409
|
const name = modelBlocksVertexAttributeName(modelId, blockIds[0]);
|
|
407
410
|
const item = modelBlocksVertexAttributeItem(modelId, blockIds[0]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BlockId, ModelId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { Visibility } from "@
|
|
2
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
import { useModelBlocksCommonStyle } from "./common";
|
|
4
4
|
import { useModelCommonStyle } from "@ogw_internal/stores/data_style/model/common";
|
|
5
5
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import type { AttributeColorMap, AttributeRange } from "@ogw_front/types/attribute";
|
|
1
2
|
import type {
|
|
2
|
-
AttributeColorMap,
|
|
3
3
|
AttributeName,
|
|
4
|
-
AttributeRange,
|
|
5
4
|
AttributeRangeMaximum,
|
|
6
5
|
AttributeRangeMinimum,
|
|
7
|
-
|
|
6
|
+
ColorRGBA,
|
|
7
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
8
8
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
9
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
10
9
|
// oxlint-disable eslint/max-lines
|
|
11
10
|
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
12
11
|
import { dispatchToComponentTypes } from "./visibility";
|
|
@@ -85,14 +84,14 @@ async function applyAttributeAccessors(
|
|
|
85
84
|
|
|
86
85
|
// oxlint-disable-next-line max-lines-per-function
|
|
87
86
|
function useModelColorStyle(componentStyleFunctions: ComponentStyleFunctions): {
|
|
88
|
-
getModelColor: (modelId: ModelId) =>
|
|
87
|
+
getModelColor: (modelId: ModelId) => ColorRGBA | undefined;
|
|
89
88
|
getModelActiveColoring: (modelId: ModelId) => unknown;
|
|
90
89
|
getModelComponentColor: (modelId: ModelId, componentId: string) => unknown;
|
|
91
90
|
getModelComponentEffectiveColor: (modelId: ModelId, componentId: string, type: string) => unknown;
|
|
92
91
|
getModelComponentActiveColoring: (modelId: ModelId, componentId: string) => unknown;
|
|
93
92
|
modelComponentTypeColor: (modelId: ModelId, type: string) => unknown;
|
|
94
93
|
getModelComponentTypeActiveColoring: (modelId: ModelId, type: string) => unknown;
|
|
95
|
-
setModelComponentTypeColor: (modelId: ModelId, type: string, color:
|
|
94
|
+
setModelComponentTypeColor: (modelId: ModelId, type: string, color: ColorRGBA) => Promise<void>;
|
|
96
95
|
setModelComponentTypeActiveColoring: (
|
|
97
96
|
modelId: ModelId,
|
|
98
97
|
type: string,
|
|
@@ -106,7 +105,7 @@ function useModelColorStyle(componentStyleFunctions: ComponentStyleFunctions): {
|
|
|
106
105
|
setModelComponentsColor: (
|
|
107
106
|
modelId: ModelId,
|
|
108
107
|
componentIds: string[],
|
|
109
|
-
color:
|
|
108
|
+
color: ColorRGBA | undefined,
|
|
110
109
|
activeColoring?: string,
|
|
111
110
|
) => Promise<unknown[]>;
|
|
112
111
|
} {
|
|
@@ -243,7 +242,7 @@ function useModelColorStyle(componentStyleFunctions: ComponentStyleFunctions): {
|
|
|
243
242
|
async function setModelComponentsColor(
|
|
244
243
|
modelId: ModelId,
|
|
245
244
|
componentIds: string[],
|
|
246
|
-
color:
|
|
245
|
+
color: ColorRGBA | undefined,
|
|
247
246
|
activeColoring = "constant",
|
|
248
247
|
): Promise<unknown[]> {
|
|
249
248
|
await modelCommonStyle.mutateComponentStyles(modelId, componentIds, {
|
|
@@ -266,7 +265,7 @@ function useModelColorStyle(componentStyleFunctions: ComponentStyleFunctions): {
|
|
|
266
265
|
async function setModelComponentTypeColor(
|
|
267
266
|
modelId: ModelId,
|
|
268
267
|
type: string,
|
|
269
|
-
color:
|
|
268
|
+
color: ColorRGBA,
|
|
270
269
|
): Promise<void> {
|
|
271
270
|
await modelCommonStyle.mutateModelComponentTypeStyle(modelId, type, {
|
|
272
271
|
coloring: {
|
|
@@ -337,10 +336,10 @@ function useModelColorStyle(componentStyleFunctions: ComponentStyleFunctions): {
|
|
|
337
336
|
}
|
|
338
337
|
await applyAttributeAccessors(modelId, [componentId], componentId, attributeFunctions);
|
|
339
338
|
}
|
|
340
|
-
function getModelColor(modelId: ModelId):
|
|
339
|
+
function getModelColor(modelId: ModelId): ColorRGBA | undefined {
|
|
341
340
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring shape is defined by the data style schema.
|
|
342
341
|
return (dataStyleState.getStyle(modelId).coloring as StyleValues).constant as
|
|
343
|
-
|
|
|
342
|
+
| ColorRGBA
|
|
344
343
|
| undefined;
|
|
345
344
|
}
|
|
346
345
|
function getModelActiveColoring(modelId: ModelId): unknown {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ColorRGBA, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import {
|
|
2
3
|
type ComponentStyleUpdate,
|
|
3
4
|
useModelComponentStyleMutations,
|
|
@@ -6,9 +7,7 @@ import {
|
|
|
6
7
|
} from "./common_mutations";
|
|
7
8
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
8
9
|
import type { ParamsOf } from "@ogw_shared/utils/types.js";
|
|
9
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
10
10
|
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
11
|
-
import type { Visibility } from "@ogw_front/types/style";
|
|
12
11
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
13
12
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
14
13
|
import type viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
@@ -49,7 +48,7 @@ interface UseModelCommonStyleReturn {
|
|
|
49
48
|
setModelTypeColor: (
|
|
50
49
|
modelId: ModelId,
|
|
51
50
|
component_ids: string[],
|
|
52
|
-
color:
|
|
51
|
+
color: ColorRGBA | undefined,
|
|
53
52
|
schema: ModelColorSchema,
|
|
54
53
|
activeColoring?: string,
|
|
55
54
|
collectionId?: string,
|
|
@@ -72,7 +71,7 @@ export function useModelCommonStyle(): UseModelCommonStyleReturn {
|
|
|
72
71
|
async function setModelTypeColor(
|
|
73
72
|
modelId: ModelId,
|
|
74
73
|
component_ids: string[],
|
|
75
|
-
color:
|
|
74
|
+
color: ColorRGBA | undefined,
|
|
76
75
|
schema: ModelColorSchema,
|
|
77
76
|
activeColoring = "constant",
|
|
78
77
|
collectionId?: string,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CornerId, 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";
|
|
@@ -14,12 +14,12 @@ interface ModelCornersColorApi {
|
|
|
14
14
|
setModelCornersColor: (
|
|
15
15
|
modelId: ModelId,
|
|
16
16
|
corners_ids: CornerId[],
|
|
17
|
-
color:
|
|
17
|
+
color: ColorRGBA | undefined,
|
|
18
18
|
activeColoring?: string,
|
|
19
19
|
collectionId?: string,
|
|
20
20
|
) => Promise<unknown>;
|
|
21
21
|
modelCornerColoring: (modelId: ModelId, corner_id?: CornerId) => StyleValues;
|
|
22
|
-
modelCornerColor: (modelId: ModelId, corner_id?: CornerId) =>
|
|
22
|
+
modelCornerColor: (modelId: ModelId, corner_id?: CornerId) => ColorRGBA | undefined;
|
|
23
23
|
modelCornerActiveColoring: (modelId: ModelId, corner_id?: CornerId) => unknown;
|
|
24
24
|
setModelCornersActiveColoring: (
|
|
25
25
|
modelId: ModelId,
|
|
@@ -40,15 +40,15 @@ export function useModelCornersColor(): ModelCornersColorApi {
|
|
|
40
40
|
return modelCornersCommonStyle.modelCornerStyle(modelId, corner_id).coloring as StyleValues;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
function modelCornerColor(modelId: ModelId, corner_id?: CornerId):
|
|
43
|
+
function modelCornerColor(modelId: ModelId, corner_id?: CornerId): ColorRGBA | undefined {
|
|
44
44
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
45
|
-
return modelCornerColoring(modelId, corner_id).constant as
|
|
45
|
+
return modelCornerColoring(modelId, corner_id).constant as ColorRGBA | undefined;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
async function setModelCornersColor(
|
|
49
49
|
modelId: ModelId,
|
|
50
50
|
corners_ids: CornerId[],
|
|
51
|
-
color:
|
|
51
|
+
color: ColorRGBA | undefined,
|
|
52
52
|
activeColoring = "constant",
|
|
53
53
|
collectionId?: string,
|
|
54
54
|
): Promise<unknown> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CornerId, ModelId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
3
3
|
import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
|
|
4
4
|
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
5
5
|
import { useDataStore } from "@ogw_front/stores/data";
|
|
@@ -9,7 +9,7 @@ import { useModelCornersVertexAttribute } from "./vertex";
|
|
|
9
9
|
import { useModelCornersVisibility } from "./visibility";
|
|
10
10
|
|
|
11
11
|
interface ColorGroup {
|
|
12
|
-
color:
|
|
12
|
+
color: ColorRGBA | undefined;
|
|
13
13
|
corners_ids: CornerId[];
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -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";
|
|
13
|
+
import type {
|
|
14
|
+
AttributeItem,
|
|
15
|
+
AttributeName,
|
|
16
|
+
AttributeRangeMaximum,
|
|
17
|
+
AttributeRangeMinimum,
|
|
18
|
+
ColorRGBA,
|
|
19
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
17
20
|
import type { CornerId, ModelId } from "@ogw_front/types/identifiers";
|
|
18
|
-
import { DEFAULT_NO_DATA_COLOR
|
|
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
|
|
@@ -76,8 +79,8 @@ interface ModelCornersVertexAttributeApi {
|
|
|
76
79
|
maximum: AttributeRangeMaximum,
|
|
77
80
|
) => Promise<void>;
|
|
78
81
|
setModelCornersVertexAttributeColorMap: IdsFn<string | undefined>;
|
|
79
|
-
modelCornersVertexAttributeNoDataColor: (modelId: ModelId, cornerId?: CornerId) =>
|
|
80
|
-
setModelCornersVertexAttributeNoDataColor: IdsFn<
|
|
82
|
+
modelCornersVertexAttributeNoDataColor: (modelId: ModelId, cornerId?: CornerId) => ColorRGBA;
|
|
83
|
+
setModelCornersVertexAttributeNoDataColor: IdsFn<ColorRGBA>;
|
|
81
84
|
}
|
|
82
85
|
|
|
83
86
|
type ModelCornersVertexAttributeGetters = Pick<
|
|
@@ -167,7 +170,7 @@ function useModelCornersVertexAttributeGetters(
|
|
|
167
170
|
function modelCornersVertexAttributeNoDataColor(
|
|
168
171
|
modelId: ModelId,
|
|
169
172
|
cornerId?: CornerId,
|
|
170
|
-
):
|
|
173
|
+
): ColorRGBA {
|
|
171
174
|
const name = modelCornersVertexAttributeName(modelId, cornerId);
|
|
172
175
|
const item = modelCornersVertexAttributeItem(modelId, cornerId);
|
|
173
176
|
return modelCornersVertexAttributeStoredConfig(modelId, cornerId, name, item).no_data_color;
|
|
@@ -376,7 +379,7 @@ function useModelCornersVertexAttribute(): ModelCornersVertexAttributeApi {
|
|
|
376
379
|
async function setModelCornersVertexAttributeNoDataColor(
|
|
377
380
|
modelId: ModelId,
|
|
378
381
|
cornerIds: CornerId[],
|
|
379
|
-
no_data_color:
|
|
382
|
+
no_data_color: ColorRGBA,
|
|
380
383
|
): Promise<void> {
|
|
381
384
|
const name = modelCornersVertexAttributeName(modelId, cornerIds[0]);
|
|
382
385
|
const item = modelCornersVertexAttributeItem(modelId, cornerIds[0]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CornerId, 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 { useModelCornersCommonStyle } 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
|
+
EdgeWidth,
|
|
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
|
EDGES_DEFAULT_COLOR,
|
|
16
18
|
EDGES_DEFAULT_VISIBILITY,
|
|
17
19
|
EDGES_DEFAULT_WIDTH,
|
|
18
|
-
type RGBAColor,
|
|
19
20
|
} from "@ogw_front/utils/default_styles/constants";
|
|
20
|
-
import type { Visibility, Width } 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";
|
|
@@ -50,10 +50,10 @@ type EdgesRequestSchema =
|
|
|
50
50
|
|
|
51
51
|
interface EdgesStyle {
|
|
52
52
|
visibility?: Visibility;
|
|
53
|
-
width?:
|
|
53
|
+
width?: EdgeWidth;
|
|
54
54
|
coloring?: {
|
|
55
55
|
active?: string;
|
|
56
|
-
constant?:
|
|
56
|
+
constant?: ColorRGBA;
|
|
57
57
|
vertex?: AttributeState;
|
|
58
58
|
};
|
|
59
59
|
}
|
|
@@ -100,11 +100,11 @@ function useModelComponentEdgesStyle(type: EdgesComponentType) {
|
|
|
100
100
|
return edgesStyle(modelId, componentId).visibility ?? EDGES_DEFAULT_VISIBILITY;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
function edgesWidth(modelId: ModelId, componentId?: string):
|
|
103
|
+
function edgesWidth(modelId: ModelId, componentId?: string): EdgeWidth {
|
|
104
104
|
return edgesStyle(modelId, componentId).width ?? EDGES_DEFAULT_WIDTH;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
function edgesColor(modelId: ModelId, componentId?: string):
|
|
107
|
+
function edgesColor(modelId: ModelId, componentId?: string): ColorRGBA {
|
|
108
108
|
return edgesStyle(modelId, componentId).coloring?.constant ?? EDGES_DEFAULT_COLOR;
|
|
109
109
|
}
|
|
110
110
|
|
|
@@ -150,7 +150,7 @@ function useModelComponentEdgesStyle(type: EdgesComponentType) {
|
|
|
150
150
|
return storedConfig(modelId, componentId).colorMap;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
function vertexAttributeNoDataColor(modelId: ModelId, componentId?: string):
|
|
153
|
+
function vertexAttributeNoDataColor(modelId: ModelId, componentId?: string): ColorRGBA {
|
|
154
154
|
return storedConfig(modelId, componentId).no_data_color;
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -213,7 +213,7 @@ function useModelComponentEdgesStyle(type: EdgesComponentType) {
|
|
|
213
213
|
async function setWidth(
|
|
214
214
|
modelId: ModelId,
|
|
215
215
|
componentIds: string[],
|
|
216
|
-
width:
|
|
216
|
+
width: EdgeWidth,
|
|
217
217
|
): Promise<unknown> {
|
|
218
218
|
const result = await requestEdges(modelId, componentIds, schemas.width, {
|
|
219
219
|
width,
|
|
@@ -225,7 +225,7 @@ function useModelComponentEdgesStyle(type: EdgesComponentType) {
|
|
|
225
225
|
async function setColor(
|
|
226
226
|
modelId: ModelId,
|
|
227
227
|
componentIds: string[],
|
|
228
|
-
color:
|
|
228
|
+
color: ColorRGBA,
|
|
229
229
|
): Promise<unknown> {
|
|
230
230
|
const result = await requestEdges(modelId, componentIds, schemas.color, {
|
|
231
231
|
color,
|
|
@@ -340,7 +340,7 @@ function useModelComponentEdgesStyle(type: EdgesComponentType) {
|
|
|
340
340
|
async function setVertexAttributeNoDataColor(
|
|
341
341
|
modelId: ModelId,
|
|
342
342
|
componentIds: string[],
|
|
343
|
-
no_data_color:
|
|
343
|
+
no_data_color: ColorRGBA,
|
|
344
344
|
): Promise<unknown> {
|
|
345
345
|
await mutateStoredConfig(modelId, componentIds, { no_data_color });
|
|
346
346
|
const result = await applyVertexAttribute(modelId, componentIds);
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useModelComponentEdgesStyle,
|
|
7
7
|
} from "@ogw_internal/stores/data_style/model/edges/component";
|
|
8
8
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
9
|
-
import type { Visibility } from "@
|
|
9
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
10
10
|
import { useModelEdgesCommonStyle } from "./common";
|
|
11
11
|
import { useModelEdgesWidthStyle } from "./width";
|
|
12
12
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
EDGES_COMPONENT_TYPES,
|
|
7
7
|
useModelComponentEdgesStyle,
|
|
8
8
|
} from "@ogw_internal/stores/data_style/model/edges/component";
|
|
9
|
+
import type { EdgeWidth } from "@geode/opengeodeweb-viewer/schema_types";
|
|
9
10
|
import type { ModelId } from "@ogw_front/types/identifiers";
|
|
10
|
-
import type { Width } from "@ogw_front/types/style";
|
|
11
11
|
import { useModelEdgesCommonStyle } 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.edges.width;
|
|
16
16
|
|
|
17
17
|
export function useModelEdgesWidthStyle(): {
|
|
18
|
-
modelEdgesWidth: (modelId: ModelId) =>
|
|
19
|
-
setModelEdgesWidth: (modelId: ModelId, width:
|
|
18
|
+
modelEdgesWidth: (modelId: ModelId) => EdgeWidth | undefined;
|
|
19
|
+
setModelEdgesWidth: (modelId: ModelId, width: EdgeWidth) => Promise<unknown>;
|
|
20
20
|
} {
|
|
21
21
|
const viewerStore = useViewerStore();
|
|
22
22
|
const modelEdgesCommonStyle = useModelEdgesCommonStyle();
|
|
@@ -24,12 +24,12 @@ export function useModelEdgesWidthStyle(): {
|
|
|
24
24
|
useModelComponentEdgesStyle(type),
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
function modelEdgesWidth(modelId: ModelId):
|
|
27
|
+
function modelEdgesWidth(modelId: ModelId): EdgeWidth | undefined {
|
|
28
28
|
// oxlint-disable-next-line no-unsafe-type-assertion -- edges style values are dynamically typed at runtime.
|
|
29
|
-
return modelEdgesCommonStyle.modelEdgesStyle(modelId).width as
|
|
29
|
+
return modelEdgesCommonStyle.modelEdgesStyle(modelId).width as EdgeWidth | undefined;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
async function setModelEdgesWidth(modelId: ModelId, width:
|
|
32
|
+
async function setModelEdgesWidth(modelId: ModelId, width: EdgeWidth): Promise<unknown> {
|
|
33
33
|
const params = { id: modelId, width };
|
|
34
34
|
const result = await viewerStore.request(
|
|
35
35
|
{
|