@geode/opengeodeweb-front 12.0.0-rc.1 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build/shared/utils/response_handlers/load.js +5 -2
- package/app/assets/geode_objects.ts +37 -108
- package/app/assets/img/geode_objects/HorizonStack3D.svg +10 -0
- package/app/components/CrsSelector.vue +6 -6
- package/app/components/ExtensionSelector.vue +21 -14
- package/app/components/MissingFilesSelector.vue +1 -1
- package/app/components/ObjectSelector.vue +7 -14
- package/app/components/ThresholdFilter.vue +1 -1
- package/app/components/TimeSeriesTargetSelector.vue +2 -5
- package/app/components/Viewer/ContextMenu/ContextMenu.vue +1 -1
- 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/Layout.vue +2 -2
- package/app/components/Viewer/ObjectTree/Views/GlobalObjects.vue +2 -1
- package/app/components/Viewer/Options/AttributeSelector.vue +1 -1
- package/app/components/Viewer/Options/ColorPicker.vue +3 -3
- package/app/components/Viewer/Options/ColoringTypeSelector.vue +8 -8
- package/app/components/Viewer/Options/TextureItem.vue +2 -6
- package/app/components/Viewer/Options/TexturesSelector.vue +1 -1
- package/app/components/Viewer/OverlappingObjectsPicker.vue +3 -3
- package/app/components/Viewer/PointSet/SpecificPointsOptions.vue +4 -5
- package/app/components/Viewer/Scene/BackgroundOptions.vue +2 -2
- package/app/components/Viewer/Scene/TextOptions.vue +2 -2
- 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/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/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/project_manager_helpers/types.ts +2 -2
- package/app/composables/use_overlapping_picker.ts +10 -8
- package/app/composables/viewer_context_menu.ts +4 -2
- package/app/composables/viewer_reset.ts +4 -5
- 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/menu.ts +18 -12
- package/app/stores/treeview.ts +5 -4
- 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 +3 -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/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 +5 -5
- package/internal/stores/data_style/time_step.ts +3 -2
- package/internal/stores/data_style/types.ts +3 -4
- package/internal/stores/hybrid_viewer/camera.ts +1 -1
- 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 +3 -3
- package/package.json +5 -4
- package/shared/utils/response_handlers/load.ts +19 -11
- package/app/types/style.ts +0 -13
|
@@ -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
|
|
@@ -86,7 +85,7 @@ function useMeshCellsVertexAttributeConfig(): UseMeshCellsVertexAttributeConfigR
|
|
|
86
85
|
interface UseMeshCellsVertexAttributeConfigValuesReturn {
|
|
87
86
|
meshCellsVertexAttributeRange: (meshId: MeshId) => AttributeRange;
|
|
88
87
|
meshCellsVertexAttributeColorMap: (meshId: MeshId) => AttributeColorMap | undefined;
|
|
89
|
-
meshCellsVertexAttributeNoDataColor: (meshId: MeshId) =>
|
|
88
|
+
meshCellsVertexAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
function useMeshCellsVertexAttributeConfigValues(): UseMeshCellsVertexAttributeConfigValuesReturn {
|
|
@@ -107,7 +106,7 @@ function useMeshCellsVertexAttributeConfigValues(): UseMeshCellsVertexAttributeC
|
|
|
107
106
|
const storedConfig = meshCellsVertexAttributeStoredConfig(meshId, name, item);
|
|
108
107
|
return storedConfig.colorMap;
|
|
109
108
|
}
|
|
110
|
-
function meshCellsVertexAttributeNoDataColor(meshId: MeshId):
|
|
109
|
+
function meshCellsVertexAttributeNoDataColor(meshId: MeshId): ColorRGBA {
|
|
111
110
|
const name = meshCellsVertexAttributeName(meshId);
|
|
112
111
|
const item = meshCellsVertexAttributeItem(meshId);
|
|
113
112
|
const storedConfig = meshCellsVertexAttributeStoredConfig(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 { useMeshCellsCommonStyle } from "./common";
|
|
8
8
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
3
3
|
// Third party imports
|
|
4
4
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
5
5
|
|
|
@@ -12,17 +12,17 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
12
12
|
const schema = viewer_schemas.opengeodeweb_viewer.mesh.edges.color;
|
|
13
13
|
|
|
14
14
|
export function useMeshEdgesColorStyle(): ReturnType<typeof useMeshEdgesOpacityStyle> & {
|
|
15
|
-
meshEdgesColor: (meshId: MeshId) =>
|
|
16
|
-
setMeshEdgesColor: (meshId: MeshId, color:
|
|
15
|
+
meshEdgesColor: (meshId: MeshId) => ColorRGBA | undefined;
|
|
16
|
+
setMeshEdgesColor: (meshId: MeshId, color: ColorRGBA) => Promise<unknown>;
|
|
17
17
|
} {
|
|
18
18
|
const viewerStore = useViewerStore();
|
|
19
19
|
const meshEdgesCommonStyle = useMeshEdgesCommonStyle();
|
|
20
20
|
|
|
21
|
-
function meshEdgesColor(meshId: MeshId):
|
|
21
|
+
function meshEdgesColor(meshId: MeshId): ColorRGBA | undefined {
|
|
22
22
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
23
|
-
return meshEdgesCommonStyle.meshEdgesColoring(meshId).constant as
|
|
23
|
+
return meshEdgesCommonStyle.meshEdgesColoring(meshId).constant as ColorRGBA | undefined;
|
|
24
24
|
}
|
|
25
|
-
async function setMeshEdgesColor(meshId: MeshId, color:
|
|
25
|
+
async function setMeshEdgesColor(meshId: MeshId, color: ColorRGBA): Promise<unknown> {
|
|
26
26
|
const params = { id: meshId, color };
|
|
27
27
|
const result = await viewerStore.request(
|
|
28
28
|
{
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import type { AttributeColorMap, AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
1
2
|
import type {
|
|
2
|
-
AttributeColorMap,
|
|
3
3
|
AttributeItem,
|
|
4
4
|
AttributeName,
|
|
5
5
|
AttributeRangeMaximum,
|
|
6
6
|
AttributeRangeMinimum,
|
|
7
|
-
|
|
8
|
-
} from "@
|
|
9
|
-
import { DEFAULT_NO_DATA_COLOR
|
|
7
|
+
ColorRGBA,
|
|
8
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
9
|
+
import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
|
|
10
10
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
11
11
|
import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
|
|
12
|
-
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
13
12
|
// Third party imports
|
|
14
13
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
14
|
+
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
15
15
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
16
16
|
|
|
17
17
|
// Local imports
|
|
@@ -162,7 +162,7 @@ function useMeshEdgesEdgeAttributeStyle(): UseMeshEdgesEdgeAttributeStyleReturn
|
|
|
162
162
|
}
|
|
163
163
|
async function setMeshEdgesEdgeAttributeNoDataColor(
|
|
164
164
|
meshId: MeshId,
|
|
165
|
-
no_data_color:
|
|
165
|
+
no_data_color: ColorRGBA,
|
|
166
166
|
): Promise<unknown> {
|
|
167
167
|
const name = meshEdgesEdgeAttributeName(meshId);
|
|
168
168
|
const item = meshEdgesEdgeAttributeItem(meshId);
|
|
@@ -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 UseMeshEdgesEdgeAttributeStyleReturn {
|
|
18
20
|
meshEdgesEdgeAttributeName: (meshId: MeshId) => AttributeName | undefined;
|
|
@@ -41,10 +43,10 @@ interface UseMeshEdgesEdgeAttributeStyleReturn {
|
|
|
41
43
|
meshId: MeshId,
|
|
42
44
|
colorMap: AttributeColorMap | undefined,
|
|
43
45
|
) => Promise<unknown>;
|
|
44
|
-
meshEdgesEdgeAttributeNoDataColor: (meshId: MeshId) =>
|
|
46
|
+
meshEdgesEdgeAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
45
47
|
setMeshEdgesEdgeAttributeNoDataColor: (
|
|
46
48
|
meshId: MeshId,
|
|
47
|
-
no_data_color:
|
|
49
|
+
no_data_color: ColorRGBA,
|
|
48
50
|
) => Promise<unknown>;
|
|
49
51
|
}
|
|
50
52
|
export type { UseMeshEdgesEdgeAttributeStyleReturn };
|
|
@@ -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
|
|
@@ -83,7 +82,7 @@ function useMeshEdgesEdgeAttributeConfig(): UseMeshEdgesEdgeAttributeConfigRetur
|
|
|
83
82
|
interface UseMeshEdgesEdgeAttributeConfigValuesReturn {
|
|
84
83
|
meshEdgesEdgeAttributeRange: (meshId: MeshId) => AttributeRange;
|
|
85
84
|
meshEdgesEdgeAttributeColorMap: (meshId: MeshId) => AttributeColorMap | undefined;
|
|
86
|
-
meshEdgesEdgeAttributeNoDataColor: (meshId: MeshId) =>
|
|
85
|
+
meshEdgesEdgeAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
87
86
|
}
|
|
88
87
|
|
|
89
88
|
function useMeshEdgesEdgeAttributeConfigValues(): UseMeshEdgesEdgeAttributeConfigValuesReturn {
|
|
@@ -104,7 +103,7 @@ function useMeshEdgesEdgeAttributeConfigValues(): UseMeshEdgesEdgeAttributeConfi
|
|
|
104
103
|
const storedConfig = meshEdgesEdgeAttributeStoredConfig(meshId, name, item);
|
|
105
104
|
return storedConfig.colorMap;
|
|
106
105
|
}
|
|
107
|
-
function meshEdgesEdgeAttributeNoDataColor(meshId: MeshId):
|
|
106
|
+
function meshEdgesEdgeAttributeNoDataColor(meshId: MeshId): ColorRGBA {
|
|
108
107
|
const name = meshEdgesEdgeAttributeName(meshId);
|
|
109
108
|
const item = meshEdgesEdgeAttributeItem(meshId);
|
|
110
109
|
const storedConfig = meshEdgesEdgeAttributeStoredConfig(meshId, name, item);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import type { ColorRGBA, Opacity } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { Opacity } from "@ogw_front/types/style";
|
|
3
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
4
3
|
// Third party imports
|
|
5
4
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
6
5
|
|
|
@@ -19,9 +18,9 @@ export function useMeshEdgesOpacityStyle(): {
|
|
|
19
18
|
const viewerStore = useViewerStore();
|
|
20
19
|
const meshEdgesCommonStyle = useMeshEdgesCommonStyle();
|
|
21
20
|
|
|
22
|
-
function meshEdgesConstantColor(meshId: MeshId):
|
|
21
|
+
function meshEdgesConstantColor(meshId: MeshId): ColorRGBA | undefined {
|
|
23
22
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
24
|
-
return meshEdgesCommonStyle.meshEdgesColoring(meshId).constant as
|
|
23
|
+
return meshEdgesCommonStyle.meshEdgesColoring(meshId).constant as ColorRGBA | undefined;
|
|
25
24
|
}
|
|
26
25
|
function meshEdgesOpacity(meshId: MeshId): Opacity | undefined {
|
|
27
26
|
return meshEdgesConstantColor(meshId)?.alpha;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import type { AttributeColorMap, AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
1
2
|
import type {
|
|
2
|
-
AttributeColorMap,
|
|
3
3
|
AttributeItem,
|
|
4
4
|
AttributeName,
|
|
5
5
|
AttributeRangeMaximum,
|
|
6
6
|
AttributeRangeMinimum,
|
|
7
|
-
|
|
8
|
-
} from "@
|
|
9
|
-
import { DEFAULT_NO_DATA_COLOR
|
|
7
|
+
ColorRGBA,
|
|
8
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
9
|
+
import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
|
|
10
10
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
11
11
|
import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
|
|
12
|
-
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
13
12
|
// Third party imports
|
|
14
13
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
14
|
+
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
15
15
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
16
16
|
|
|
17
17
|
// Local imports
|
|
@@ -167,7 +167,7 @@ function useMeshEdgesVertexAttributeStyle(): UseMeshEdgesVertexAttributeStyleRet
|
|
|
167
167
|
}
|
|
168
168
|
async function setMeshEdgesVertexAttributeNoDataColor(
|
|
169
169
|
meshId: MeshId,
|
|
170
|
-
no_data_color:
|
|
170
|
+
no_data_color: ColorRGBA,
|
|
171
171
|
): Promise<unknown> {
|
|
172
172
|
const name = meshEdgesVertexAttributeName(meshId);
|
|
173
173
|
const item = meshEdgesVertexAttributeItem(meshId);
|
|
@@ -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 UseMeshEdgesVertexAttributeStyleReturn {
|
|
18
20
|
meshEdgesVertexAttributeName: (meshId: MeshId) => AttributeName | undefined;
|
|
@@ -41,10 +43,10 @@ interface UseMeshEdgesVertexAttributeStyleReturn {
|
|
|
41
43
|
meshId: MeshId,
|
|
42
44
|
colorMap: AttributeColorMap | undefined,
|
|
43
45
|
) => Promise<unknown>;
|
|
44
|
-
meshEdgesVertexAttributeNoDataColor: (meshId: MeshId) =>
|
|
46
|
+
meshEdgesVertexAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
45
47
|
setMeshEdgesVertexAttributeNoDataColor: (
|
|
46
48
|
meshId: MeshId,
|
|
47
|
-
no_data_color:
|
|
49
|
+
no_data_color: ColorRGBA,
|
|
48
50
|
) => Promise<unknown>;
|
|
49
51
|
}
|
|
50
52
|
export type { UseMeshEdgesVertexAttributeStyleReturn };
|
|
@@ -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
|
|
@@ -86,7 +85,7 @@ function useMeshEdgesVertexAttributeConfig(): UseMeshEdgesVertexAttributeConfigR
|
|
|
86
85
|
interface UseMeshEdgesVertexAttributeConfigValuesReturn {
|
|
87
86
|
meshEdgesVertexAttributeRange: (meshId: MeshId) => AttributeRange;
|
|
88
87
|
meshEdgesVertexAttributeColorMap: (meshId: MeshId) => AttributeColorMap | undefined;
|
|
89
|
-
meshEdgesVertexAttributeNoDataColor: (meshId: MeshId) =>
|
|
88
|
+
meshEdgesVertexAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
function useMeshEdgesVertexAttributeConfigValues(): UseMeshEdgesVertexAttributeConfigValuesReturn {
|
|
@@ -107,7 +106,7 @@ function useMeshEdgesVertexAttributeConfigValues(): UseMeshEdgesVertexAttributeC
|
|
|
107
106
|
const storedConfig = meshEdgesVertexAttributeStoredConfig(meshId, name, item);
|
|
108
107
|
return storedConfig.colorMap;
|
|
109
108
|
}
|
|
110
|
-
function meshEdgesVertexAttributeNoDataColor(meshId: MeshId):
|
|
109
|
+
function meshEdgesVertexAttributeNoDataColor(meshId: MeshId): ColorRGBA {
|
|
111
110
|
const name = meshEdgesVertexAttributeName(meshId);
|
|
112
111
|
const item = meshEdgesVertexAttributeItem(meshId);
|
|
113
112
|
const storedConfig = meshEdgesVertexAttributeStoredConfig(meshId, name, item);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
3
3
|
|
|
4
4
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
5
|
-
import type { Visibility } from "@
|
|
5
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
6
6
|
import { useMeshEdgesCommonStyle } from "./common";
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Third party imports
|
|
2
2
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
3
3
|
|
|
4
|
+
import type { EdgeWidth } from "@geode/opengeodeweb-viewer/schema_types";
|
|
4
5
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
5
|
-
import type { Width } from "@ogw_front/types/style";
|
|
6
6
|
import { useMeshEdgesCommonStyle } from "./common";
|
|
7
7
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
8
8
|
|
|
@@ -10,17 +10,17 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
10
10
|
const schema = viewer_schemas.opengeodeweb_viewer.mesh.edges.width;
|
|
11
11
|
|
|
12
12
|
export function useMeshEdgesWidthStyle(): {
|
|
13
|
-
meshEdgesWidth: (meshId: MeshId) =>
|
|
14
|
-
setMeshEdgesWidth: (meshId: MeshId, width:
|
|
13
|
+
meshEdgesWidth: (meshId: MeshId) => EdgeWidth | undefined;
|
|
14
|
+
setMeshEdgesWidth: (meshId: MeshId, width: EdgeWidth) => Promise<unknown>;
|
|
15
15
|
} {
|
|
16
16
|
const viewerStore = useViewerStore();
|
|
17
17
|
const meshEdgesCommonStyle = useMeshEdgesCommonStyle();
|
|
18
18
|
|
|
19
|
-
function meshEdgesWidth(meshId: MeshId):
|
|
19
|
+
function meshEdgesWidth(meshId: MeshId): EdgeWidth | undefined {
|
|
20
20
|
// oxlint-disable-next-line no-unsafe-type-assertion -- width is defined as number in the data style schema.
|
|
21
|
-
return meshEdgesCommonStyle.meshEdgesStyle(meshId).width as
|
|
21
|
+
return meshEdgesCommonStyle.meshEdgesStyle(meshId).width as EdgeWidth | undefined;
|
|
22
22
|
}
|
|
23
|
-
async function setMeshEdgesWidth(meshId: MeshId, width:
|
|
23
|
+
async function setMeshEdgesWidth(meshId: MeshId, width: EdgeWidth): Promise<unknown> {
|
|
24
24
|
const params = { id: meshId, width };
|
|
25
25
|
const result = await viewerStore.request(
|
|
26
26
|
{
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import type { ColorRGBA, Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import type { AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
2
3
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
3
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
4
|
-
import type { Visibility } from "@ogw_front/types/style";
|
|
5
4
|
|
|
6
5
|
// Local imports
|
|
7
6
|
import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
|
|
@@ -17,8 +16,8 @@ import { whenDefined } from "@ogw_internal/stores/data_style/when_defined";
|
|
|
17
16
|
export function useMeshStyle(): {
|
|
18
17
|
meshVisibility: (meshId: MeshId) => Visibility | undefined;
|
|
19
18
|
setMeshVisibility: (meshId: MeshId, visibility: Visibility) => Promise<unknown>;
|
|
20
|
-
meshColor: (meshId: MeshId) =>
|
|
21
|
-
setMeshColor: (meshId: MeshId, color:
|
|
19
|
+
meshColor: (meshId: MeshId) => ColorRGBA | undefined;
|
|
20
|
+
setMeshColor: (meshId: MeshId, color: ColorRGBA) => Promise<unknown>;
|
|
22
21
|
applyMeshStyle: (meshId: MeshId) => Promise<unknown[]>;
|
|
23
22
|
} & ReturnType<typeof useMeshPointsStyle> &
|
|
24
23
|
ReturnType<typeof useMeshEdgesStyle> &
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
3
3
|
// Third party imports
|
|
4
4
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
5
5
|
|
|
@@ -12,17 +12,17 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
12
12
|
const schema = viewer_schemas.opengeodeweb_viewer.mesh.points.color;
|
|
13
13
|
|
|
14
14
|
export function useMeshPointsColorStyle(): ReturnType<typeof useMeshPointsOpacityStyle> & {
|
|
15
|
-
meshPointsColor: (meshId: MeshId) =>
|
|
16
|
-
setMeshPointsColor: (meshId: MeshId, color:
|
|
15
|
+
meshPointsColor: (meshId: MeshId) => ColorRGBA | undefined;
|
|
16
|
+
setMeshPointsColor: (meshId: MeshId, color: ColorRGBA) => Promise<unknown>;
|
|
17
17
|
} {
|
|
18
18
|
const viewerStore = useViewerStore();
|
|
19
19
|
const meshPointsCommonStyle = useMeshPointsCommonStyle();
|
|
20
20
|
|
|
21
|
-
function meshPointsColor(meshId: MeshId):
|
|
21
|
+
function meshPointsColor(meshId: MeshId): ColorRGBA | undefined {
|
|
22
22
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
23
|
-
return meshPointsCommonStyle.meshPointsColoring(meshId).constant as
|
|
23
|
+
return meshPointsCommonStyle.meshPointsColoring(meshId).constant as ColorRGBA | undefined;
|
|
24
24
|
}
|
|
25
|
-
async function setMeshPointsColor(meshId: MeshId, color:
|
|
25
|
+
async function setMeshPointsColor(meshId: MeshId, color: ColorRGBA): Promise<unknown> {
|
|
26
26
|
const params = { id: meshId, color };
|
|
27
27
|
const result = await viewerStore.request(
|
|
28
28
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
2
2
|
import type { StyleValues } from "@ogw_internal/stores/data_style/types.js";
|
|
3
|
-
import type { Visibility } from "@
|
|
3
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
4
4
|
import { useDataStyleState } from "@ogw_internal/stores/data_style/state";
|
|
5
5
|
|
|
6
6
|
export function useMeshPointsCommonStyle(): {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import type { ColorRGBA, Opacity } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { Opacity } from "@ogw_front/types/style";
|
|
3
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
4
3
|
// Third party imports
|
|
5
4
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
6
5
|
|
|
@@ -19,9 +18,9 @@ export function useMeshPointsOpacityStyle(): {
|
|
|
19
18
|
const viewerStore = useViewerStore();
|
|
20
19
|
const meshPointsCommonStyle = useMeshPointsCommonStyle();
|
|
21
20
|
|
|
22
|
-
function meshPointsConstantColor(meshId: MeshId):
|
|
21
|
+
function meshPointsConstantColor(meshId: MeshId): ColorRGBA | undefined {
|
|
23
22
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
24
|
-
return meshPointsCommonStyle.meshPointsColoring(meshId).constant as
|
|
23
|
+
return meshPointsCommonStyle.meshPointsColoring(meshId).constant as ColorRGBA | undefined;
|
|
25
24
|
}
|
|
26
25
|
function meshPointsOpacity(meshId: MeshId): Opacity | undefined {
|
|
27
26
|
return meshPointsConstantColor(meshId)?.alpha;
|
|
@@ -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 {
|
|
6
|
+
import type { PointSize } from "@geode/opengeodeweb-viewer/schema_types";
|
|
7
7
|
import { useMeshPointsCommonStyle } from "./common";
|
|
8
8
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
9
9
|
|
|
@@ -11,17 +11,17 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
11
11
|
const schema = viewer_schemas.opengeodeweb_viewer.mesh.points.size;
|
|
12
12
|
|
|
13
13
|
export function useMeshPointsSizeStyle(): {
|
|
14
|
-
meshPointsSize: (meshId: MeshId) =>
|
|
15
|
-
setMeshPointsSize: (meshId: MeshId, size:
|
|
14
|
+
meshPointsSize: (meshId: MeshId) => PointSize | undefined;
|
|
15
|
+
setMeshPointsSize: (meshId: MeshId, size: PointSize) => Promise<unknown>;
|
|
16
16
|
} {
|
|
17
17
|
const viewerStore = useViewerStore();
|
|
18
18
|
const meshPointsCommonStyle = useMeshPointsCommonStyle();
|
|
19
19
|
|
|
20
|
-
function meshPointsSize(meshId: MeshId):
|
|
20
|
+
function meshPointsSize(meshId: MeshId): PointSize | undefined {
|
|
21
21
|
// oxlint-disable-next-line no-unsafe-type-assertion -- size is defined as number in the data style schema.
|
|
22
|
-
return meshPointsCommonStyle.meshPointsStyle(meshId).size as
|
|
22
|
+
return meshPointsCommonStyle.meshPointsStyle(meshId).size as PointSize | undefined;
|
|
23
23
|
}
|
|
24
|
-
async function setMeshPointsSize(meshId: MeshId, size:
|
|
24
|
+
async function setMeshPointsSize(meshId: MeshId, size: PointSize): Promise<unknown> {
|
|
25
25
|
const params = { id: meshId, size };
|
|
26
26
|
const result = await viewerStore.request(
|
|
27
27
|
{
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import type { AttributeColorMap, AttributeTimeStep } from "@ogw_front/types/attribute";
|
|
1
2
|
import type {
|
|
2
|
-
AttributeColorMap,
|
|
3
3
|
AttributeItem,
|
|
4
4
|
AttributeName,
|
|
5
5
|
AttributeRangeMaximum,
|
|
6
6
|
AttributeRangeMinimum,
|
|
7
|
-
|
|
8
|
-
} from "@
|
|
9
|
-
import { DEFAULT_NO_DATA_COLOR
|
|
7
|
+
ColorRGBA,
|
|
8
|
+
} from "@geode/opengeodeweb-viewer/schema_types";
|
|
9
|
+
import { DEFAULT_NO_DATA_COLOR } from "@ogw_front/utils/default_styles/constants";
|
|
10
10
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
11
11
|
import type { ValidAttributeInput } from "@ogw_internal/stores/data_style/attribute_types";
|
|
12
|
-
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
13
12
|
// Third party imports
|
|
14
13
|
import back_schemas from "@geode/opengeodeweb-back/opengeodeweb_back_typed_schemas.js";
|
|
14
|
+
import { isAttributeValid } from "@ogw_internal/stores/data_style/attribute_valid";
|
|
15
15
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
16
16
|
|
|
17
17
|
// Local imports
|
|
@@ -167,7 +167,7 @@ function useMeshPointsVertexAttributeStyle(): UseMeshPointsVertexAttributeStyleR
|
|
|
167
167
|
}
|
|
168
168
|
async function setMeshPointsVertexAttributeNoDataColor(
|
|
169
169
|
meshId: MeshId,
|
|
170
|
-
no_data_color:
|
|
170
|
+
no_data_color: ColorRGBA,
|
|
171
171
|
): Promise<unknown> {
|
|
172
172
|
const name = meshPointsVertexAttributeName(meshId);
|
|
173
173
|
const item = meshPointsVertexAttributeItem(meshId);
|
|
@@ -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 UseMeshPointsVertexAttributeStyleReturn {
|
|
18
20
|
meshPointsVertexAttributeName: (meshId: MeshId) => AttributeName | undefined;
|
|
@@ -41,10 +43,10 @@ interface UseMeshPointsVertexAttributeStyleReturn {
|
|
|
41
43
|
meshId: MeshId,
|
|
42
44
|
colorMap: AttributeColorMap | undefined,
|
|
43
45
|
) => Promise<unknown>;
|
|
44
|
-
meshPointsVertexAttributeNoDataColor: (meshId: MeshId) =>
|
|
46
|
+
meshPointsVertexAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
45
47
|
setMeshPointsVertexAttributeNoDataColor: (
|
|
46
48
|
meshId: MeshId,
|
|
47
|
-
no_data_color:
|
|
49
|
+
no_data_color: ColorRGBA,
|
|
48
50
|
) => Promise<unknown>;
|
|
49
51
|
}
|
|
50
52
|
export type { UseMeshPointsVertexAttributeStyleReturn };
|
|
@@ -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
|
|
@@ -86,7 +85,7 @@ function useMeshPointsVertexAttributeConfig(): UseMeshPointsVertexAttributeConfi
|
|
|
86
85
|
interface UseMeshPointsVertexAttributeConfigValuesReturn {
|
|
87
86
|
meshPointsVertexAttributeRange: (meshId: MeshId) => AttributeRange;
|
|
88
87
|
meshPointsVertexAttributeColorMap: (meshId: MeshId) => AttributeColorMap | undefined;
|
|
89
|
-
meshPointsVertexAttributeNoDataColor: (meshId: MeshId) =>
|
|
88
|
+
meshPointsVertexAttributeNoDataColor: (meshId: MeshId) => ColorRGBA;
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
function useMeshPointsVertexAttributeConfigValues(): UseMeshPointsVertexAttributeConfigValuesReturn {
|
|
@@ -107,7 +106,7 @@ function useMeshPointsVertexAttributeConfigValues(): UseMeshPointsVertexAttribut
|
|
|
107
106
|
const storedConfig = meshPointsVertexAttributeStoredConfig(meshId, name, item);
|
|
108
107
|
return storedConfig.colorMap;
|
|
109
108
|
}
|
|
110
|
-
function meshPointsVertexAttributeNoDataColor(meshId: MeshId):
|
|
109
|
+
function meshPointsVertexAttributeNoDataColor(meshId: MeshId): ColorRGBA {
|
|
111
110
|
const name = meshPointsVertexAttributeName(meshId);
|
|
112
111
|
const item = meshPointsVertexAttributeItem(meshId);
|
|
113
112
|
const storedConfig = meshPointsVertexAttributeStoredConfig(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 { useMeshPointsCommonStyle } from "./common";
|
|
8
8
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
9
9
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ColorRGBA } from "@geode/opengeodeweb-viewer/schema_types";
|
|
1
2
|
import type { MeshId } from "@ogw_front/types/identifiers";
|
|
2
|
-
import type { RGBAColor } from "@ogw_front/utils/default_styles/constants";
|
|
3
3
|
// Third party imports
|
|
4
4
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
5
5
|
|
|
@@ -12,17 +12,17 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
12
12
|
const schema = viewer_schemas.opengeodeweb_viewer.mesh.polygons.color;
|
|
13
13
|
|
|
14
14
|
export function useMeshPolygonsColorStyle(): ReturnType<typeof useMeshPolygonsOpacityStyle> & {
|
|
15
|
-
meshPolygonsColor: (meshId: MeshId) =>
|
|
16
|
-
setMeshPolygonsColor: (meshId: MeshId, color:
|
|
15
|
+
meshPolygonsColor: (meshId: MeshId) => ColorRGBA | undefined;
|
|
16
|
+
setMeshPolygonsColor: (meshId: MeshId, color: ColorRGBA) => Promise<unknown>;
|
|
17
17
|
} {
|
|
18
18
|
const viewerStore = useViewerStore();
|
|
19
19
|
const meshPolygonsCommonStyle = useMeshPolygonsCommonStyle();
|
|
20
20
|
|
|
21
|
-
function meshPolygonsColor(meshId: MeshId):
|
|
21
|
+
function meshPolygonsColor(meshId: MeshId): ColorRGBA | undefined {
|
|
22
22
|
// oxlint-disable-next-line no-unsafe-type-assertion -- coloring.constant shape is defined by the data style schema.
|
|
23
|
-
return meshPolygonsCommonStyle.meshPolygonsColoring(meshId).constant as
|
|
23
|
+
return meshPolygonsCommonStyle.meshPolygonsColoring(meshId).constant as ColorRGBA | undefined;
|
|
24
24
|
}
|
|
25
|
-
async function setMeshPolygonsColor(meshId: MeshId, color:
|
|
25
|
+
async function setMeshPolygonsColor(meshId: MeshId, color: ColorRGBA): Promise<unknown> {
|
|
26
26
|
const params = { id: meshId, color };
|
|
27
27
|
const result = await viewerStore.request(
|
|
28
28
|
{
|