@geode/opengeodeweb-front 12.0.0-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/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 +2 -1
- package/shared/utils/response_handlers/load.ts +19 -11
- package/app/types/style.ts +0 -13
|
@@ -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,5 +1,5 @@
|
|
|
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
|
|
|
@@ -22,8 +22,8 @@ const orientation_widget_schema = viewer_schemas.opengeodeweb_viewer.viewer.set_
|
|
|
22
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>;
|
|
@@ -85,12 +85,12 @@ export function useSceneStyle(): {
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
async function setSceneBackgroundColor(color:
|
|
88
|
+
async function setSceneBackgroundColor(color: ColorRGBA): Promise<void> {
|
|
89
89
|
await hybridViewerStore.setBackgroundColor(toViewerColor(color));
|
|
90
90
|
await saveSceneStyle({ background_color: color });
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
async function setSceneTextColor(color:
|
|
93
|
+
async function setSceneTextColor(color: ColorRGBA): Promise<unknown> {
|
|
94
94
|
const result = await requestTextStyle({ ...sceneStyle.value.text, color });
|
|
95
95
|
return result;
|
|
96
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;
|
|
@@ -2,7 +2,7 @@ import { EASE_EXPONENT, applyCameraOptions, getImageStyle, toBounds } from "./ca
|
|
|
2
2
|
import { animateCamera, computeAnimationDuration, getCameraOptions } from "./camera_animation";
|
|
3
3
|
import { requireRenderWindow, useHybridViewerCore } from "./core";
|
|
4
4
|
import type { CameraOptions } from "./vtk_types";
|
|
5
|
-
import type { DataId } from "@
|
|
5
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
6
6
|
import { animateCameraOrientation } from "./camera_orientation";
|
|
7
7
|
import { useHybridViewerScene } from "./scene";
|
|
8
8
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
@@ -2,8 +2,8 @@ import type { JsonRpcSchema, ParamsOf, ResponseOf } from "@ogw_shared/utils/type
|
|
|
2
2
|
import viewer_schemas, {
|
|
3
3
|
type ViewerClippingPlanesParams,
|
|
4
4
|
} from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
5
|
-
import type { AttributeName } from "@
|
|
6
|
-
import type { DataId } from "@
|
|
5
|
+
import type { AttributeName } from "@geode/opengeodeweb-viewer/schema_types";
|
|
6
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
7
7
|
import type { SliceAxis } from "@ogw_front/utils/slice";
|
|
8
8
|
import { useHybridViewerCore } from "./core";
|
|
9
9
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { GeodeIdentified, ModelId } from "@ogw_front/types/identifiers";
|
|
2
2
|
import { HOVER_DEBOUNCE_MS, HOVER_TIMEOUT_MS } from "./constants";
|
|
3
3
|
import type { HoverComponentInfo, HoverData } from "./vtk_types";
|
|
4
4
|
import viewer_schemas, {
|
|
5
5
|
type PickedFieldType,
|
|
6
6
|
type ViewerHighlightResponse,
|
|
7
7
|
} from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
8
|
+
import type { GeodeId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
8
9
|
import type { IndexableType } from "dexie";
|
|
9
10
|
import { database } from "@ogw_internal/database/database.js";
|
|
10
11
|
import { useHybridViewerCore } from "./core";
|
|
@@ -4,8 +4,8 @@ import { requireRenderWindow, useHybridViewerCore } from "./core";
|
|
|
4
4
|
import viewer_schemas, {
|
|
5
5
|
type ViewerSetBackgroundColorParams,
|
|
6
6
|
} from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_typed_schemas.js";
|
|
7
|
-
import type { DataId } from "@
|
|
8
|
-
import type { Visibility } from "@
|
|
7
|
+
import type { DataId } from "@geode/opengeodeweb-microservice/schema_types";
|
|
8
|
+
import type { Visibility } from "@geode/opengeodeweb-viewer/schema_types";
|
|
9
9
|
import { base64ToArrayBuffer } from "./base64";
|
|
10
10
|
import { getCameraOptions } from "./camera_animation";
|
|
11
11
|
import { getDefaultSceneStyle } from "@ogw_front/utils/default_styles";
|
|
@@ -25,7 +25,7 @@ function localBackgroundColor(): [number, number, number] {
|
|
|
25
25
|
async function setBackgroundColor(color: ViewerSetBackgroundColorParams["color"]): Promise<void> {
|
|
26
26
|
const { genericRenderWindow, remoteRender } = useHybridViewerCore();
|
|
27
27
|
const renderer = requireRenderWindow(genericRenderWindow).getRenderer();
|
|
28
|
-
renderer.setBackground([color.
|
|
28
|
+
renderer.setBackground([color.red / RGB_MAX, color.green / RGB_MAX, color.blue / RGB_MAX]);
|
|
29
29
|
const renderWindow = requireRenderWindow(genericRenderWindow).getRenderWindow();
|
|
30
30
|
renderWindow.render();
|
|
31
31
|
const viewerStore = useViewerStore();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
|
-
"version": "12.0.0-rc.
|
|
3
|
+
"version": "12.0.0-rc.2",
|
|
4
4
|
"description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
|
|
5
5
|
"homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
|
|
6
6
|
"bugs": {
|
|
@@ -84,6 +84,7 @@
|
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@geode/cloud-api": "next",
|
|
86
86
|
"@geode/opengeodeweb-back": "next",
|
|
87
|
+
"@geode/opengeodeweb-microservice": "next",
|
|
87
88
|
"@geode/opengeodeweb-viewer": "next",
|
|
88
89
|
"@kitware/vtk.js": "33.3.0",
|
|
89
90
|
"@msgpack/msgpack": "2.8.0",
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
+
import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types";
|
|
2
|
+
|
|
1
3
|
interface AllowedObject {
|
|
2
4
|
readonly is_loadable: number;
|
|
3
5
|
readonly object_priority?: number;
|
|
4
6
|
readonly loadable_family?: string;
|
|
5
7
|
}
|
|
6
|
-
type AllowedObjectMap = Record<
|
|
8
|
+
type AllowedObjectMap = Partial<Record<GeodeObjectType, AllowedObject>>;
|
|
7
9
|
// Mirrors the allowed_objects route response
|
|
8
10
|
interface AllowedObjectsResponse {
|
|
9
11
|
readonly allowed_objects: AllowedObjectMap;
|
|
10
12
|
// One type per content of the file, empty when the user has to choose
|
|
11
|
-
readonly objects_to_load: readonly
|
|
13
|
+
readonly objects_to_load: readonly GeodeObjectType[];
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
function getFileExtension(filename: string): string {
|
|
15
17
|
return filename.slice(filename.lastIndexOf(".") + 1);
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
// The types of a map of allowed objects
|
|
21
|
+
function allowedObjectTypes(objectMap: AllowedObjectMap): GeodeObjectType[] {
|
|
22
|
+
// oxlint-disable-next-line typescript/no-unsafe-type-assertion -- Object.keys loses the key type of the map
|
|
23
|
+
return Object.keys(objectMap) as GeodeObjectType[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function getObject(objectMap: AllowedObjectMap, key: GeodeObjectType): AllowedObject {
|
|
19
27
|
const object = objectMap[key];
|
|
20
28
|
if (!object) {
|
|
21
29
|
throw new Error(`Unknown geode object key: ${key}`);
|
|
@@ -24,14 +32,14 @@ function getObject(objectMap: AllowedObjectMap, key: string): AllowedObject {
|
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
function intersectAllowedObjects(allowedObjectsList: readonly AllowedObjectMap[]): {
|
|
27
|
-
commonKeys:
|
|
28
|
-
allKeys:
|
|
35
|
+
commonKeys: GeodeObjectType[];
|
|
36
|
+
allKeys: GeodeObjectType[];
|
|
29
37
|
mergedAllowedObjects: AllowedObjectMap;
|
|
30
38
|
} {
|
|
31
|
-
const allKeys = [...new Set(allowedObjectsList.flatMap((object) =>
|
|
39
|
+
const allKeys = [...new Set(allowedObjectsList.flatMap((object) => allowedObjectTypes(object)))];
|
|
32
40
|
const commonKeys = allKeys.filter((key) => allowedObjectsList.every((object) => key in object));
|
|
33
41
|
|
|
34
|
-
const mergedEntries = commonKeys.map((key): [
|
|
42
|
+
const mergedEntries = commonKeys.map((key): [GeodeObjectType, AllowedObject] => {
|
|
35
43
|
const loadScores = allowedObjectsList.map((object) => getObject(object, key).is_loadable);
|
|
36
44
|
const priorities = allowedObjectsList
|
|
37
45
|
.map((object) => getObject(object, key).object_priority)
|
|
@@ -69,13 +77,13 @@ function resolveAllowedObjects(
|
|
|
69
77
|
interface FileAllowedObjects {
|
|
70
78
|
readonly filename: string;
|
|
71
79
|
// Loadable types only, sorted by best is_loadable then best object_priority
|
|
72
|
-
readonly candidates:
|
|
80
|
+
readonly candidates: GeodeObjectType[];
|
|
73
81
|
// Types the backend selected to load every content of the file, empty when the user has to choose
|
|
74
|
-
readonly selectedGeodeObjects:
|
|
82
|
+
readonly selectedGeodeObjects: GeodeObjectType[];
|
|
75
83
|
}
|
|
76
84
|
|
|
77
|
-
function sortCandidates(objectMap: AllowedObjectMap):
|
|
78
|
-
return
|
|
85
|
+
function sortCandidates(objectMap: AllowedObjectMap): GeodeObjectType[] {
|
|
86
|
+
return allowedObjectTypes(objectMap)
|
|
79
87
|
.filter((key) => getObject(objectMap, key).is_loadable > 0)
|
|
80
88
|
.toSorted((keyA, keyB) => {
|
|
81
89
|
const objectA = getObject(objectMap, keyA);
|
package/app/types/style.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// Whether something is shown in the viewer
|
|
2
|
-
type Visibility = boolean;
|
|
3
|
-
|
|
4
|
-
// How wide the edges of a data are drawn in the viewer
|
|
5
|
-
type Width = number;
|
|
6
|
-
|
|
7
|
-
// How big the points of a data are drawn in the viewer
|
|
8
|
-
type Size = number;
|
|
9
|
-
|
|
10
|
-
// How opaque something is drawn in the viewer
|
|
11
|
-
type Opacity = number;
|
|
12
|
-
|
|
13
|
-
export type { Opacity, Size, Visibility, Width };
|