@geode/opengeodeweb-front 10.34.0-rc.11 → 10.34.0-rc.13
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/fetch_raw.js +6 -6
- package/app/components/csv-preview/CsvPreviewer.vue +21 -22
- package/app/composables/clipping_planes_widget.ts +5 -5
- package/app/composables/clipping_planes_widget_entries.ts +6 -8
- package/app/composables/global_attribute_style.ts +1 -1
- package/app/composables/hover_highlight.ts +3 -3
- package/app/composables/project_manager.ts +1 -1
- package/app/composables/responsive_middle_truncate.ts +3 -3
- package/app/composables/stepper_tree.ts +5 -5
- package/app/composables/tree_filter.ts +3 -7
- package/app/composables/tree_keyboard_nav.ts +8 -8
- package/app/composables/tree_scroll.ts +10 -10
- package/app/composables/use_adaptive_styles.ts +1 -1
- package/app/composables/use_overlapping_picker.ts +10 -13
- package/app/composables/virtual_tree.ts +6 -14
- package/app/plugins/auto_store_register.ts +1 -1
- package/app/stores/app.ts +12 -15
- package/app/stores/back.ts +3 -6
- package/app/stores/camera_manager.ts +2 -5
- package/app/stores/data.ts +16 -16
- package/app/stores/data_helpers/collections.ts +6 -14
- package/app/stores/data_helpers/mesh.ts +6 -8
- package/app/stores/data_style.ts +7 -7
- package/app/stores/hybrid_viewer.ts +1 -1
- package/app/stores/infra.ts +15 -21
- package/app/stores/menu.ts +1 -1
- package/app/stores/treeview.ts +7 -7
- package/app/stores/viewer.ts +5 -4
- package/app/utils/attributes.ts +1 -1
- package/app/utils/clipping_planes.ts +12 -17
- package/app/utils/colormap.ts +1 -1
- package/app/utils/default_styles/meshes.ts +5 -5
- package/app/utils/default_styles/models.ts +4 -4
- package/app/utils/extension.ts +6 -10
- package/app/utils/import_workflow.ts +3 -3
- package/app/utils/log.ts +4 -4
- package/internal/stores/data_style/mesh/cells/index.ts +10 -10
- package/internal/stores/data_style/mesh/edges/index.ts +10 -10
- package/internal/stores/data_style/mesh/points/common.ts +5 -6
- package/internal/stores/data_style/mesh/points/index.ts +8 -8
- package/internal/stores/data_style/mesh/polygons/index.ts +10 -10
- package/internal/stores/data_style/mesh/polyhedra/index.ts +9 -11
- package/internal/stores/data_style/state.ts +12 -15
- package/internal/stores/hybrid_viewer/brightness.ts +6 -13
- package/internal/stores/hybrid_viewer/camera.ts +12 -4
- package/internal/stores/hybrid_viewer/core.ts +1 -1
- package/internal/stores/hybrid_viewer/filters.ts +3 -9
- package/internal/stores/hybrid_viewer/viewport.ts +4 -10
- package/package.json +1 -1
- package/server/api/microservice/extensions/download.post.ts +1 -1
- package/server/utils/app_config.ts +1 -1
- package/server/utils/cleanup.ts +6 -8
- package/server/utils/microservices.ts +6 -9
- package/server/utils/scripts.ts +2 -2
- package/server/utils/ws_client.ts +5 -9
- package/shared/utils/call_raw.ts +7 -18
- package/shared/utils/call_schema.ts +5 -5
- package/shared/utils/fetch_raw.ts +18 -18
- package/shared/utils/fetch_schema.ts +4 -11
- package/shared/utils/response_handlers/load.ts +1 -1
- package/shared/utils/types.ts +3 -3
- package/shared/utils/validate_schema.ts +1 -4
|
@@ -15,9 +15,9 @@ interface FileToImport {
|
|
|
15
15
|
readonly geode_object_type: string;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
// NewDataItem has mutable array fields (mesh_components, collection_components), so
|
|
19
|
-
//
|
|
20
|
-
async function importItem(item:
|
|
18
|
+
// NewDataItem has mutable array fields (mesh_components, collection_components), so it can't
|
|
19
|
+
// Satisfy prefer-readonly-parameter-types deeply; left unfixed (same pattern as app/plugins/auto_store_register.ts).
|
|
20
|
+
async function importItem(item: NewDataItem): Promise<string> {
|
|
21
21
|
const dataStore = useDataStore();
|
|
22
22
|
const dataStyleStore = useDataStyleStore();
|
|
23
23
|
const hybridViewerStore = useHybridViewerStore();
|
package/app/utils/log.ts
CHANGED
|
@@ -4,16 +4,16 @@ interface Loggable {
|
|
|
4
4
|
$id: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
function startRequestLog(microservice:
|
|
7
|
+
function startRequestLog(microservice: Loggable, schema: JsonRpcSchema): Date {
|
|
8
8
|
console.log(`[${microservice.$id}] Request:`, schema.$id);
|
|
9
9
|
const requestStartingTime = new Date(Date.now());
|
|
10
10
|
return requestStartingTime;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
function endRequestLog(
|
|
14
|
-
microservice:
|
|
15
|
-
schema:
|
|
16
|
-
requestStartingTime:
|
|
14
|
+
microservice: Loggable,
|
|
15
|
+
schema: JsonRpcSchema,
|
|
16
|
+
requestStartingTime: Date,
|
|
17
17
|
): void {
|
|
18
18
|
const requestEndingTime = new Date(Date.now());
|
|
19
19
|
console.log(
|
|
@@ -12,16 +12,16 @@ import { useMeshCellsVisibilityStyle } from "./visibility";
|
|
|
12
12
|
// Local constants
|
|
13
13
|
|
|
14
14
|
interface MeshCellsActiveColoringDeps {
|
|
15
|
-
readonly commonStyle:
|
|
16
|
-
readonly colorStyle:
|
|
17
|
-
readonly texturesStyle:
|
|
18
|
-
readonly vertexAttributeStyle:
|
|
19
|
-
readonly cellAttributeStyle:
|
|
15
|
+
readonly commonStyle: ReturnType<typeof useMeshCellsCommonStyle>;
|
|
16
|
+
readonly colorStyle: ReturnType<typeof useMeshCellsColorStyle>;
|
|
17
|
+
readonly texturesStyle: ReturnType<typeof useMeshCellsTexturesStyle>;
|
|
18
|
+
readonly vertexAttributeStyle: ReturnType<typeof useMeshCellsVertexAttributeStyle>;
|
|
19
|
+
readonly cellAttributeStyle: ReturnType<typeof useMeshCellsCellAttributeStyle>;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
function handleMeshCellsVertexColoring(
|
|
23
23
|
id: string,
|
|
24
|
-
vertexAttributeStyle:
|
|
24
|
+
vertexAttributeStyle: ReturnType<typeof useMeshCellsVertexAttributeStyle>,
|
|
25
25
|
): Promise<unknown> | undefined {
|
|
26
26
|
const name = vertexAttributeStyle.meshCellsVertexAttributeName(id);
|
|
27
27
|
const item = vertexAttributeStyle.meshCellsVertexAttributeItem(id);
|
|
@@ -36,7 +36,7 @@ function handleMeshCellsVertexColoring(
|
|
|
36
36
|
|
|
37
37
|
function handleMeshCellsCellColoring(
|
|
38
38
|
id: string,
|
|
39
|
-
cellAttributeStyle:
|
|
39
|
+
cellAttributeStyle: ReturnType<typeof useMeshCellsCellAttributeStyle>,
|
|
40
40
|
): Promise<unknown> | undefined {
|
|
41
41
|
const name = cellAttributeStyle.meshCellsCellAttributeName(id);
|
|
42
42
|
const item = cellAttributeStyle.meshCellsCellAttributeItem(id);
|
|
@@ -52,7 +52,7 @@ function handleMeshCellsCellColoring(
|
|
|
52
52
|
async function setMeshCellsActiveColoring(
|
|
53
53
|
id: string,
|
|
54
54
|
type: string | undefined,
|
|
55
|
-
deps:
|
|
55
|
+
deps: MeshCellsActiveColoringDeps,
|
|
56
56
|
): Promise<unknown> {
|
|
57
57
|
await deps.commonStyle.mutateMeshCellsStyle(id, {
|
|
58
58
|
coloring: { active: type },
|
|
@@ -81,9 +81,9 @@ async function setMeshCellsActiveColoring(
|
|
|
81
81
|
|
|
82
82
|
async function applyMeshCellsStyle(
|
|
83
83
|
id: string,
|
|
84
|
-
visibilityStyle:
|
|
84
|
+
visibilityStyle: ReturnType<typeof useMeshCellsVisibilityStyle>,
|
|
85
85
|
activeColoringType: string | undefined,
|
|
86
|
-
deps:
|
|
86
|
+
deps: MeshCellsActiveColoringDeps,
|
|
87
87
|
): Promise<unknown[]> {
|
|
88
88
|
const result = await Promise.all([
|
|
89
89
|
visibilityStyle.setMeshCellsVisibility(id, visibilityStyle.meshCellsVisibility(id)),
|
|
@@ -12,15 +12,15 @@ import { useMeshEdgesWidthStyle } from "./width";
|
|
|
12
12
|
// Local constants
|
|
13
13
|
|
|
14
14
|
interface MeshEdgesActiveColoringDeps {
|
|
15
|
-
readonly commonStyle:
|
|
16
|
-
readonly colorStyle:
|
|
17
|
-
readonly vertexAttributeStyle:
|
|
18
|
-
readonly edgeAttributeStyle:
|
|
15
|
+
readonly commonStyle: ReturnType<typeof useMeshEdgesCommonStyle>;
|
|
16
|
+
readonly colorStyle: ReturnType<typeof useMeshEdgesColorStyle>;
|
|
17
|
+
readonly vertexAttributeStyle: ReturnType<typeof useMeshEdgesVertexAttributeStyle>;
|
|
18
|
+
readonly edgeAttributeStyle: ReturnType<typeof useMeshEdgesEdgeAttributeStyle>;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function handleMeshEdgesVertexColoring(
|
|
22
22
|
id: string,
|
|
23
|
-
vertexAttributeStyle:
|
|
23
|
+
vertexAttributeStyle: ReturnType<typeof useMeshEdgesVertexAttributeStyle>,
|
|
24
24
|
): Promise<unknown> | undefined {
|
|
25
25
|
const name = vertexAttributeStyle.meshEdgesVertexAttributeName(id);
|
|
26
26
|
const item = vertexAttributeStyle.meshEdgesVertexAttributeItem(id);
|
|
@@ -35,7 +35,7 @@ function handleMeshEdgesVertexColoring(
|
|
|
35
35
|
|
|
36
36
|
function handleMeshEdgesEdgeColoring(
|
|
37
37
|
id: string,
|
|
38
|
-
edgeAttributeStyle:
|
|
38
|
+
edgeAttributeStyle: ReturnType<typeof useMeshEdgesEdgeAttributeStyle>,
|
|
39
39
|
): Promise<unknown> | undefined {
|
|
40
40
|
const name = edgeAttributeStyle.meshEdgesEdgeAttributeName(id);
|
|
41
41
|
const item = edgeAttributeStyle.meshEdgesEdgeAttributeItem(id);
|
|
@@ -51,7 +51,7 @@ function handleMeshEdgesEdgeColoring(
|
|
|
51
51
|
async function setMeshEdgesActiveColoring(
|
|
52
52
|
id: string,
|
|
53
53
|
type: string | undefined,
|
|
54
|
-
deps:
|
|
54
|
+
deps: MeshEdgesActiveColoringDeps,
|
|
55
55
|
): Promise<unknown> {
|
|
56
56
|
await deps.commonStyle.mutateMeshEdgesStyle(id, {
|
|
57
57
|
coloring: { active: type },
|
|
@@ -73,10 +73,10 @@ async function setMeshEdgesActiveColoring(
|
|
|
73
73
|
|
|
74
74
|
async function applyMeshEdgesStyle(
|
|
75
75
|
id: string,
|
|
76
|
-
visibilityStyle:
|
|
77
|
-
widthStyle:
|
|
76
|
+
visibilityStyle: ReturnType<typeof useMeshEdgesVisibilityStyle>,
|
|
77
|
+
widthStyle: ReturnType<typeof useMeshEdgesWidthStyle>,
|
|
78
78
|
activeColoringType: string | undefined,
|
|
79
|
-
deps:
|
|
79
|
+
deps: MeshEdgesActiveColoringDeps,
|
|
80
80
|
): Promise<unknown[]> {
|
|
81
81
|
const result = await Promise.all([
|
|
82
82
|
visibilityStyle.setMeshEdgesVisibility(id, visibilityStyle.meshEdgesVisibility(id)),
|
|
@@ -6,9 +6,7 @@ export function useMeshPointsCommonStyle(): {
|
|
|
6
6
|
meshPointsColoring: (id: string) => StyleValues;
|
|
7
7
|
mutateMeshPointsColoring: (id: string, values: StyleValues) => Promise<string>;
|
|
8
8
|
mutateMeshPointsStyle: (id: string, values: StyleValues) => Promise<string>;
|
|
9
|
-
mutateMeshPointsVisibility: (
|
|
10
|
-
response: Readonly<{ id: string; visibility: boolean }>,
|
|
11
|
-
) => Promise<string>;
|
|
9
|
+
mutateMeshPointsVisibility: (response: { id: string; visibility: boolean }) => Promise<string>;
|
|
12
10
|
} {
|
|
13
11
|
const dataStyleState = useDataStyleState();
|
|
14
12
|
|
|
@@ -19,9 +17,10 @@ export function useMeshPointsCommonStyle(): {
|
|
|
19
17
|
return result;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
|
-
async function mutateMeshPointsVisibility(
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
async function mutateMeshPointsVisibility(response: {
|
|
21
|
+
id: string;
|
|
22
|
+
visibility: boolean;
|
|
23
|
+
}): Promise<string> {
|
|
25
24
|
const result = await mutateMeshPointsStyle(response.id, { visibility: response.visibility });
|
|
26
25
|
return result;
|
|
27
26
|
}
|
|
@@ -11,14 +11,14 @@ import { useMeshPointsVisibilityStyle } from "./visibility";
|
|
|
11
11
|
// Local constants
|
|
12
12
|
|
|
13
13
|
interface MeshPointsActiveColoringDeps {
|
|
14
|
-
readonly commonStyle:
|
|
15
|
-
readonly colorStyle:
|
|
16
|
-
readonly vertexAttributeStyle:
|
|
14
|
+
readonly commonStyle: ReturnType<typeof useMeshPointsCommonStyle>;
|
|
15
|
+
readonly colorStyle: ReturnType<typeof useMeshPointsColorStyle>;
|
|
16
|
+
readonly vertexAttributeStyle: ReturnType<typeof useMeshPointsVertexAttributeStyle>;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function handleMeshPointsVertexColoring(
|
|
20
20
|
id: string,
|
|
21
|
-
vertexAttributeStyle:
|
|
21
|
+
vertexAttributeStyle: ReturnType<typeof useMeshPointsVertexAttributeStyle>,
|
|
22
22
|
): Promise<unknown> | undefined {
|
|
23
23
|
const name = vertexAttributeStyle.meshPointsVertexAttributeName(id);
|
|
24
24
|
const item = vertexAttributeStyle.meshPointsVertexAttributeItem(id);
|
|
@@ -34,7 +34,7 @@ function handleMeshPointsVertexColoring(
|
|
|
34
34
|
async function setMeshPointsActiveColoring(
|
|
35
35
|
id: string,
|
|
36
36
|
type: string | undefined,
|
|
37
|
-
deps:
|
|
37
|
+
deps: MeshPointsActiveColoringDeps,
|
|
38
38
|
): Promise<unknown> {
|
|
39
39
|
await deps.commonStyle.mutateMeshPointsStyle(id, {
|
|
40
40
|
coloring: { active: type },
|
|
@@ -55,10 +55,10 @@ async function setMeshPointsActiveColoring(
|
|
|
55
55
|
|
|
56
56
|
async function applyMeshPointsStyle(
|
|
57
57
|
id: string,
|
|
58
|
-
visibilityStyle:
|
|
59
|
-
sizeStyle:
|
|
58
|
+
visibilityStyle: ReturnType<typeof useMeshPointsVisibilityStyle>,
|
|
59
|
+
sizeStyle: ReturnType<typeof useMeshPointsSizeStyle>,
|
|
60
60
|
activeColoringType: string | undefined,
|
|
61
|
-
deps:
|
|
61
|
+
deps: MeshPointsActiveColoringDeps,
|
|
62
62
|
): Promise<unknown[]> {
|
|
63
63
|
const result = await Promise.all([
|
|
64
64
|
visibilityStyle.setMeshPointsVisibility(id, visibilityStyle.meshPointsVisibility(id)),
|
|
@@ -15,16 +15,16 @@ import { useMeshPolygonsVisibilityStyle } from "./visibility";
|
|
|
15
15
|
// Local constants
|
|
16
16
|
|
|
17
17
|
interface MeshPolygonsActiveColoringDeps {
|
|
18
|
-
readonly commonStyle:
|
|
19
|
-
readonly colorStyle:
|
|
20
|
-
readonly texturesStyle:
|
|
21
|
-
readonly vertexAttributeStyle:
|
|
22
|
-
readonly polygonAttributeStyle:
|
|
18
|
+
readonly commonStyle: ReturnType<typeof useMeshPolygonsCommonStyle>;
|
|
19
|
+
readonly colorStyle: ReturnType<typeof useMeshPolygonsColorStyle>;
|
|
20
|
+
readonly texturesStyle: ReturnType<typeof useMeshPolygonsTexturesStyle>;
|
|
21
|
+
readonly vertexAttributeStyle: ReturnType<typeof useMeshPolygonsVertexAttributeStyle>;
|
|
22
|
+
readonly polygonAttributeStyle: ReturnType<typeof useMeshPolygonsPolygonAttributeStyle>;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
function handleMeshPolygonsVertexColoring(
|
|
26
26
|
id: string,
|
|
27
|
-
vertexAttributeStyle:
|
|
27
|
+
vertexAttributeStyle: ReturnType<typeof useMeshPolygonsVertexAttributeStyle>,
|
|
28
28
|
): Promise<unknown> | undefined {
|
|
29
29
|
const name = vertexAttributeStyle.meshPolygonsVertexAttributeName(id);
|
|
30
30
|
const item = vertexAttributeStyle.meshPolygonsVertexAttributeItem(id);
|
|
@@ -39,7 +39,7 @@ function handleMeshPolygonsVertexColoring(
|
|
|
39
39
|
|
|
40
40
|
function handleMeshPolygonsPolygonColoring(
|
|
41
41
|
id: string,
|
|
42
|
-
polygonAttributeStyle:
|
|
42
|
+
polygonAttributeStyle: ReturnType<typeof useMeshPolygonsPolygonAttributeStyle>,
|
|
43
43
|
): Promise<unknown> | undefined {
|
|
44
44
|
const name = polygonAttributeStyle.meshPolygonsPolygonAttributeName(id);
|
|
45
45
|
const item = polygonAttributeStyle.meshPolygonsPolygonAttributeItem(id);
|
|
@@ -55,7 +55,7 @@ function handleMeshPolygonsPolygonColoring(
|
|
|
55
55
|
async function setMeshPolygonsActiveColoring(
|
|
56
56
|
id: string,
|
|
57
57
|
type: string | undefined,
|
|
58
|
-
deps:
|
|
58
|
+
deps: MeshPolygonsActiveColoringDeps,
|
|
59
59
|
): Promise<unknown> {
|
|
60
60
|
await deps.commonStyle.mutateMeshPolygonsStyle(id, {
|
|
61
61
|
coloring: { active: type },
|
|
@@ -87,9 +87,9 @@ async function setMeshPolygonsActiveColoring(
|
|
|
87
87
|
|
|
88
88
|
async function applyMeshPolygonsStyle(
|
|
89
89
|
id: string,
|
|
90
|
-
visibilityStyle:
|
|
90
|
+
visibilityStyle: ReturnType<typeof useMeshPolygonsVisibilityStyle>,
|
|
91
91
|
activeColoringType: string | undefined,
|
|
92
|
-
deps:
|
|
92
|
+
deps: MeshPolygonsActiveColoringDeps,
|
|
93
93
|
): Promise<unknown[]> {
|
|
94
94
|
const result = await Promise.all([
|
|
95
95
|
visibilityStyle.setMeshPolygonsVisibility(id, visibilityStyle.meshPolygonsVisibility(id)),
|
|
@@ -17,17 +17,15 @@ import { useMeshPolyhedraVisibilityStyle } from "./visibility";
|
|
|
17
17
|
// Local constants
|
|
18
18
|
|
|
19
19
|
interface MeshPolyhedraActiveColoringDeps {
|
|
20
|
-
readonly commonStyle:
|
|
21
|
-
readonly colorStyle:
|
|
22
|
-
readonly vertexAttributeStyle:
|
|
23
|
-
readonly polyhedronAttributeStyle:
|
|
24
|
-
ReturnType<typeof useMeshPolyhedraPolyhedronAttributeStyle>
|
|
25
|
-
>;
|
|
20
|
+
readonly commonStyle: ReturnType<typeof useMeshPolyhedraCommonStyle>;
|
|
21
|
+
readonly colorStyle: ReturnType<typeof useMeshPolyhedraColorStyle>;
|
|
22
|
+
readonly vertexAttributeStyle: ReturnType<typeof useMeshPolyhedraVertexAttributeStyle>;
|
|
23
|
+
readonly polyhedronAttributeStyle: ReturnType<typeof useMeshPolyhedraPolyhedronAttributeStyle>;
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
function handleMeshPolyhedraVertexColoring(
|
|
29
27
|
id: string,
|
|
30
|
-
vertexAttributeStyle:
|
|
28
|
+
vertexAttributeStyle: ReturnType<typeof useMeshPolyhedraVertexAttributeStyle>,
|
|
31
29
|
): Promise<unknown> | undefined {
|
|
32
30
|
const name = vertexAttributeStyle.meshPolyhedraVertexAttributeName(id);
|
|
33
31
|
const item = vertexAttributeStyle.meshPolyhedraVertexAttributeItem(id);
|
|
@@ -42,7 +40,7 @@ function handleMeshPolyhedraVertexColoring(
|
|
|
42
40
|
|
|
43
41
|
function handleMeshPolyhedraPolyhedronColoring(
|
|
44
42
|
id: string,
|
|
45
|
-
polyhedronAttributeStyle:
|
|
43
|
+
polyhedronAttributeStyle: ReturnType<typeof useMeshPolyhedraPolyhedronAttributeStyle>,
|
|
46
44
|
): Promise<unknown> | undefined {
|
|
47
45
|
const name = polyhedronAttributeStyle.meshPolyhedraPolyhedronAttributeName(id);
|
|
48
46
|
const item = polyhedronAttributeStyle.meshPolyhedraPolyhedronAttributeItem(id);
|
|
@@ -58,7 +56,7 @@ function handleMeshPolyhedraPolyhedronColoring(
|
|
|
58
56
|
async function setMeshPolyhedraActiveColoring(
|
|
59
57
|
id: string,
|
|
60
58
|
type: string | undefined,
|
|
61
|
-
deps:
|
|
59
|
+
deps: MeshPolyhedraActiveColoringDeps,
|
|
62
60
|
): Promise<unknown> {
|
|
63
61
|
await deps.commonStyle.mutateMeshPolyhedraStyle(id, {
|
|
64
62
|
coloring: { active: type },
|
|
@@ -83,9 +81,9 @@ async function setMeshPolyhedraActiveColoring(
|
|
|
83
81
|
|
|
84
82
|
async function applyMeshPolyhedraStyle(
|
|
85
83
|
id: string,
|
|
86
|
-
visibilityStyle:
|
|
84
|
+
visibilityStyle: ReturnType<typeof useMeshPolyhedraVisibilityStyle>,
|
|
87
85
|
activeColoringType: string | undefined,
|
|
88
|
-
deps:
|
|
86
|
+
deps: MeshPolyhedraActiveColoringDeps,
|
|
89
87
|
): Promise<unknown[]> {
|
|
90
88
|
const result = await Promise.all([
|
|
91
89
|
visibilityStyle.setMeshPolyhedraVisibility(id, visibilityStyle.meshPolyhedraVisibility(id)),
|
|
@@ -18,26 +18,26 @@ interface SharedState {
|
|
|
18
18
|
updateComponentStyleCache: (
|
|
19
19
|
modelId: string,
|
|
20
20
|
componentId: string,
|
|
21
|
-
styleValues:
|
|
21
|
+
styleValues: StyleValues,
|
|
22
22
|
) => void;
|
|
23
23
|
bulkUpdateComponentStyleCache: (
|
|
24
24
|
modelId: string,
|
|
25
25
|
componentStyleUpdates: readonly {
|
|
26
26
|
readonly id_component: string;
|
|
27
|
-
readonly values:
|
|
27
|
+
readonly values: StyleValues;
|
|
28
28
|
}[],
|
|
29
29
|
) => void;
|
|
30
30
|
bulkUpdateComponentStylesCache: (
|
|
31
31
|
modelId: string,
|
|
32
32
|
componentIds: readonly string[],
|
|
33
|
-
styleValues:
|
|
33
|
+
styleValues: StyleValues,
|
|
34
34
|
) => void;
|
|
35
35
|
updateModelComponentTypeStyleCache: (
|
|
36
36
|
modelId: string,
|
|
37
37
|
componentType: string,
|
|
38
|
-
styleValues:
|
|
38
|
+
styleValues: StyleValues,
|
|
39
39
|
) => void;
|
|
40
|
-
updateStyleCache: (objectId: string, styleValues:
|
|
40
|
+
updateStyleCache: (objectId: string, styleValues: StyleValues) => void;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
let sharedState: SharedState | undefined = undefined;
|
|
@@ -100,7 +100,7 @@ function getSharedState(): SharedState {
|
|
|
100
100
|
function updateComponentStyleCache(
|
|
101
101
|
modelId: string,
|
|
102
102
|
componentId: string,
|
|
103
|
-
styleValues:
|
|
103
|
+
styleValues: StyleValues,
|
|
104
104
|
): void {
|
|
105
105
|
const cacheKey = `${modelId}_${componentId}`;
|
|
106
106
|
const existingStyle = componentStyles.value[cacheKey];
|
|
@@ -118,7 +118,7 @@ function getSharedState(): SharedState {
|
|
|
118
118
|
modelId: string,
|
|
119
119
|
componentStyleUpdates: readonly {
|
|
120
120
|
readonly id_component: string;
|
|
121
|
-
readonly values:
|
|
121
|
+
readonly values: StyleValues;
|
|
122
122
|
}[],
|
|
123
123
|
): void {
|
|
124
124
|
const updatedComponentStyles = { ...componentStyles.value };
|
|
@@ -140,7 +140,7 @@ function getSharedState(): SharedState {
|
|
|
140
140
|
function bulkUpdateComponentStylesCache(
|
|
141
141
|
modelId: string,
|
|
142
142
|
componentIds: readonly string[],
|
|
143
|
-
styleValues:
|
|
143
|
+
styleValues: StyleValues,
|
|
144
144
|
): void {
|
|
145
145
|
const updatedComponentStyles = { ...componentStyles.value };
|
|
146
146
|
for (const componentId of componentIds) {
|
|
@@ -161,14 +161,14 @@ function getSharedState(): SharedState {
|
|
|
161
161
|
function updateModelComponentTypeStyleCache(
|
|
162
162
|
modelId: string,
|
|
163
163
|
componentType: string,
|
|
164
|
-
styleValues:
|
|
164
|
+
styleValues: StyleValues,
|
|
165
165
|
): void {
|
|
166
166
|
const cacheKey = `${modelId}_${componentType}`;
|
|
167
167
|
modelComponentTypeStyles.value[cacheKey] ??= { id_model: modelId, type: componentType };
|
|
168
168
|
merge(modelComponentTypeStyles.value[cacheKey], styleValues);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
function updateStyleCache(objectId: string, styleValues:
|
|
171
|
+
function updateStyleCache(objectId: string, styleValues: StyleValues): void {
|
|
172
172
|
styles.value[objectId] ??= { id: objectId };
|
|
173
173
|
merge(styles.value[objectId], styleValues);
|
|
174
174
|
}
|
|
@@ -192,7 +192,7 @@ interface DataStyleStateApi extends SharedState {
|
|
|
192
192
|
getStyle: (objectId: string) => ObjectStyle;
|
|
193
193
|
getComponentStyle: (modelId: string, componentId: string) => ModelComponentStyle;
|
|
194
194
|
getModelComponentTypeStyle: (modelId: string, componentType: string) => ModelComponentTypeStyle;
|
|
195
|
-
mutateStyle: (objectId: string, styleValues:
|
|
195
|
+
mutateStyle: (objectId: string, styleValues: StyleValues) => Promise<string>;
|
|
196
196
|
objectVisibility: ComputedRef<(objectId: string) => boolean | undefined>;
|
|
197
197
|
selectedObjects: ComputedRef<string[]>;
|
|
198
198
|
clear: () => Promise<void>;
|
|
@@ -235,10 +235,7 @@ export function useDataStyleState(): DataStyleStateApi {
|
|
|
235
235
|
return { ...toRaw(style) };
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
async function mutateStyle(
|
|
239
|
-
objectId: string,
|
|
240
|
-
styleValues: Readonly<StyleValues>,
|
|
241
|
-
): Promise<string> {
|
|
238
|
+
async function mutateStyle(objectId: string, styleValues: StyleValues): Promise<string> {
|
|
242
239
|
state.updateStyleCache(objectId, styleValues);
|
|
243
240
|
const currentStyle = getStyle(objectId);
|
|
244
241
|
merge(currentStyle, styleValues);
|
|
@@ -28,11 +28,7 @@ interface RelativeRect {
|
|
|
28
28
|
relH: number;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
function mapRect(
|
|
32
|
-
rect: Readonly<Rect>,
|
|
33
|
-
latestImage: Readonly<DrawableImage>,
|
|
34
|
-
canvasRect: Readonly<DOMRect>,
|
|
35
|
-
): RelativeRect {
|
|
31
|
+
function mapRect(rect: Rect, latestImage: DrawableImage, canvasRect: DOMRect): RelativeRect {
|
|
36
32
|
const scaleX = latestImage.width / canvasRect.width;
|
|
37
33
|
const scaleY = latestImage.height / canvasRect.height;
|
|
38
34
|
return {
|
|
@@ -45,8 +41,8 @@ function mapRect(
|
|
|
45
41
|
|
|
46
42
|
function sampleMinBrightness(
|
|
47
43
|
ctx: CanvasRenderingContext2D,
|
|
48
|
-
image:
|
|
49
|
-
relRect:
|
|
44
|
+
image: DrawableImage,
|
|
45
|
+
relRect: RelativeRect,
|
|
50
46
|
): number {
|
|
51
47
|
ctx.drawImage(
|
|
52
48
|
image,
|
|
@@ -70,10 +66,7 @@ function sampleMinBrightness(
|
|
|
70
66
|
return minBrightness;
|
|
71
67
|
}
|
|
72
68
|
|
|
73
|
-
function computeAverageBrightness(
|
|
74
|
-
rect: Readonly<Rect>,
|
|
75
|
-
options: Readonly<BrightnessOptions>,
|
|
76
|
-
): number {
|
|
69
|
+
function computeAverageBrightness(rect: Rect, options: BrightnessOptions): number {
|
|
77
70
|
const { latestImage, offscreenCtx, offscreenCanvas } = options;
|
|
78
71
|
const { genericRenderWindow } = useHybridViewerCore();
|
|
79
72
|
if (!latestImage || !offscreenCtx || !offscreenCanvas || !genericRenderWindow.value) {
|
|
@@ -106,7 +99,7 @@ function computeAverageBrightness(
|
|
|
106
99
|
}
|
|
107
100
|
function useHybridViewerBrightness(): {
|
|
108
101
|
latestImage: Ref<DrawableImage | undefined>;
|
|
109
|
-
getAverageBrightness: (rect:
|
|
102
|
+
getAverageBrightness: (rect: Rect) => number;
|
|
110
103
|
} {
|
|
111
104
|
const latestImage = ref<DrawableImage | undefined>(undefined);
|
|
112
105
|
const offscreenCanvas: HTMLCanvasElement | undefined =
|
|
@@ -116,7 +109,7 @@ function useHybridViewerBrightness(): {
|
|
|
116
109
|
willReadFrequently: true,
|
|
117
110
|
}) ?? undefined)
|
|
118
111
|
: undefined;
|
|
119
|
-
function getAverageBrightness(rect:
|
|
112
|
+
function getAverageBrightness(rect: Rect): number {
|
|
120
113
|
return computeAverageBrightness(rect, {
|
|
121
114
|
latestImage: latestImage.value,
|
|
122
115
|
offscreenCtx,
|
|
@@ -110,13 +110,21 @@ function centerCameraOnPosition(
|
|
|
110
110
|
if (!camera || !pickedPosition) {
|
|
111
111
|
return;
|
|
112
112
|
}
|
|
113
|
-
const focalPoint = camera.getFocalPoint();
|
|
114
113
|
const position = camera.getPosition();
|
|
114
|
+
const directionOfProjection = camera.getDirectionOfProjection();
|
|
115
|
+
const distance = dot(
|
|
116
|
+
[
|
|
117
|
+
pickedPosition[0] - position[0],
|
|
118
|
+
pickedPosition[1] - position[1],
|
|
119
|
+
pickedPosition[2] - position[2],
|
|
120
|
+
],
|
|
121
|
+
directionOfProjection,
|
|
122
|
+
);
|
|
115
123
|
camera.setFocalPoint(...pickedPosition);
|
|
116
124
|
camera.setPosition(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
125
|
+
pickedPosition[0] - distance * directionOfProjection[0],
|
|
126
|
+
pickedPosition[1] - distance * directionOfProjection[1],
|
|
127
|
+
pickedPosition[2] - distance * directionOfProjection[2],
|
|
120
128
|
);
|
|
121
129
|
}
|
|
122
130
|
|
|
@@ -9,7 +9,7 @@ interface GenericRenderWindowHolder {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
// `genericRenderWindow.value` is only ever read from these functions after the viewer has been initialized (see app/stores/hybrid_viewer.ts's initHybridViewer), so requireRenderWindow throwing on that path would indicate a real bug rather than an expected state.
|
|
12
|
-
function requireRenderWindow(holder:
|
|
12
|
+
function requireRenderWindow(holder: GenericRenderWindowHolder): VtkGenericRenderWindow {
|
|
13
13
|
if (!holder.value) {
|
|
14
14
|
throw new Error("genericRenderWindow accessed before the viewer was initialized");
|
|
15
15
|
}
|
|
@@ -2,7 +2,7 @@ import { useHybridViewerCore } from "./core";
|
|
|
2
2
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
3
3
|
import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schemas.json";
|
|
4
4
|
|
|
5
|
-
async function
|
|
5
|
+
async function setClippingPlanes(ids: string[], planes: unknown): Promise<void> {
|
|
6
6
|
const viewerStore = useViewerStore();
|
|
7
7
|
const { remoteRender } = useHybridViewerCore();
|
|
8
8
|
const schema = viewer_schemas.opengeodeweb_viewer.viewer.clipping_planes;
|
|
@@ -16,7 +16,7 @@ async function performSetClippingPlanes(ids: string[], planes: unknown): Promise
|
|
|
16
16
|
});
|
|
17
17
|
await remoteRender();
|
|
18
18
|
}
|
|
19
|
-
async function
|
|
19
|
+
async function setShrink(ids: string[], shrink_factor: number): Promise<void> {
|
|
20
20
|
const viewerStore = useViewerStore();
|
|
21
21
|
const { remoteRender } = useHybridViewerCore();
|
|
22
22
|
const schema = viewer_schemas.opengeodeweb_viewer.viewer.shrink;
|
|
@@ -34,15 +34,9 @@ function useHybridViewerFilters(): {
|
|
|
34
34
|
setClippingPlanes: (ids: string[], planes: unknown) => Promise<void>;
|
|
35
35
|
setShrink: (ids: string[], shrink_factor: number) => Promise<void>;
|
|
36
36
|
} {
|
|
37
|
-
async function setClippingPlanes(ids: string[], planes: unknown): Promise<void> {
|
|
38
|
-
await performSetClippingPlanes(ids, planes);
|
|
39
|
-
}
|
|
40
|
-
async function setShrink(ids: string[], shrink_factor: number): Promise<void> {
|
|
41
|
-
await performSetShrink(ids, shrink_factor);
|
|
42
|
-
}
|
|
43
37
|
return {
|
|
44
38
|
setClippingPlanes,
|
|
45
39
|
setShrink,
|
|
46
40
|
};
|
|
47
41
|
}
|
|
48
|
-
export {
|
|
42
|
+
export { useHybridViewerFilters };
|
|
@@ -15,7 +15,7 @@ interface HybridViewerViewport {
|
|
|
15
15
|
viewStream: Ref<ViewStreamLike | undefined>;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
async function
|
|
18
|
+
async function resize(width: number, height: number): Promise<void> {
|
|
19
19
|
const { genericRenderWindow, remoteRender, status, viewStream } = useHybridViewerCore();
|
|
20
20
|
const viewerStore = useViewerStore();
|
|
21
21
|
if (viewerStore.status !== Status.CONNECTED || status.value !== Status.CREATED) {
|
|
@@ -77,7 +77,7 @@ function performClickPicking(event: MouseEvent, containerElement: HTMLElement):
|
|
|
77
77
|
);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
function
|
|
80
|
+
function setContainer(container: ContainerRef | undefined): void {
|
|
81
81
|
if (!container || !container.value) {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
@@ -102,7 +102,7 @@ function performSetContainer(container: ContainerRef | undefined): void {
|
|
|
102
102
|
transition: "opacity 0.1s ease-in",
|
|
103
103
|
zIndex: 1,
|
|
104
104
|
});
|
|
105
|
-
void
|
|
105
|
+
void resize(containerElement.offsetWidth, containerElement.offsetHeight);
|
|
106
106
|
let has_dragged = false;
|
|
107
107
|
useMousePressed({
|
|
108
108
|
target: containerElement,
|
|
@@ -167,17 +167,11 @@ function performSetContainer(container: ContainerRef | undefined): void {
|
|
|
167
167
|
}
|
|
168
168
|
function useHybridViewerViewport(): HybridViewerViewport {
|
|
169
169
|
const { viewStream } = useHybridViewerCore();
|
|
170
|
-
function setContainer(container: ContainerRef | undefined): void {
|
|
171
|
-
performSetContainer(container);
|
|
172
|
-
}
|
|
173
|
-
async function resize(width: number, height: number): Promise<void> {
|
|
174
|
-
await performResize(width, height);
|
|
175
|
-
}
|
|
176
170
|
return {
|
|
177
171
|
setContainer,
|
|
178
172
|
resize,
|
|
179
173
|
viewStream,
|
|
180
174
|
};
|
|
181
175
|
}
|
|
182
|
-
export { performClickPicking,
|
|
176
|
+
export { performClickPicking, useHybridViewerViewport };
|
|
183
177
|
export type { ViewStreamLike } from "./vtk_types";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geode/opengeodeweb-front",
|
|
3
|
-
"version": "10.34.0-rc.
|
|
3
|
+
"version": "10.34.0-rc.13",
|
|
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": {
|
|
@@ -21,7 +21,7 @@ export default defineEventHandler(async (event: H3Event) => {
|
|
|
21
21
|
const body = await readBody<DownloadExtensionBody>(event);
|
|
22
22
|
const { projectName, url, extensionFileName } = body;
|
|
23
23
|
console.log({ projectName, url, extensionFileName });
|
|
24
|
-
const response:
|
|
24
|
+
const response: Response = await fetch(url);
|
|
25
25
|
const fileBuffer = await response.arrayBuffer();
|
|
26
26
|
const filePath = targetExtensionFilePath(projectName, extensionFileName);
|
|
27
27
|
await fs.writeFile(filePath, Buffer.from(fileBuffer));
|
|
@@ -45,7 +45,7 @@ function extensionsConf(projectName: string): ExtensionsConfigSchema["extensions
|
|
|
45
45
|
|
|
46
46
|
function addExtensionToConf(
|
|
47
47
|
projectName: string,
|
|
48
|
-
{ extensionId, extensionPath }:
|
|
48
|
+
{ extensionId, extensionPath }: { extensionId: string; extensionPath: string },
|
|
49
49
|
): void {
|
|
50
50
|
const projectConfig = projectConf(projectName);
|
|
51
51
|
projectConfig.set(`extensions.${extensionId}.path`, extensionPath);
|