@geode/opengeodeweb-front 10.22.0 → 10.22.1-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/app/components/CrsSelector.vue +7 -4
- package/app/components/ExtensionSelector.vue +2 -4
- package/app/components/FileSelector.vue +1 -1
- package/app/components/Inspector/InspectionButton.vue +10 -7
- package/app/components/MissingFilesSelector.vue +8 -9
- package/app/components/ObjectSelector.vue +9 -5
- package/app/components/PackagesVersions.vue +1 -2
- package/app/components/RemoteRenderingView.vue +3 -4
- package/app/components/Screenshot.vue +8 -4
- package/app/components/ViewToolbar.vue +6 -2
- package/app/components/Viewer/Options/AttributeSelector.vue +2 -2
- package/app/components/Viewer/Options/TextureItem.vue +9 -10
- package/app/composables/hover_highlight.js +2 -2
- package/app/composables/project_manager.js +3 -6
- package/app/composables/use_overlapping_picker.js +6 -3
- package/app/stores/app.js +10 -7
- package/app/stores/back.js +13 -11
- package/app/stores/camera_manager.js +3 -3
- package/app/stores/cloud.js +21 -18
- package/app/stores/data.js +6 -2
- package/app/stores/hybrid_viewer.js +13 -10
- package/app/stores/viewer.js +18 -16
- package/app/utils/extension.js +1 -1
- package/app/utils/import_workflow.js +4 -3
- package/app/utils/local/microservices.js +7 -7
- package/app/utils/local/path.js +68 -13
- package/internal/stores/data_style/mesh/cells/cell.js +19 -6
- package/internal/stores/data_style/mesh/cells/color.js +6 -3
- package/internal/stores/data_style/mesh/cells/textures.js +6 -3
- package/internal/stores/data_style/mesh/cells/vertex.js +10 -6
- package/internal/stores/data_style/mesh/cells/visibility.js +6 -3
- package/internal/stores/data_style/mesh/edges/color.js +6 -3
- package/internal/stores/data_style/mesh/edges/edge.js +13 -6
- package/internal/stores/data_style/mesh/edges/vertex.js +10 -6
- package/internal/stores/data_style/mesh/edges/visibility.js +6 -3
- package/internal/stores/data_style/mesh/edges/width.js +6 -3
- package/internal/stores/data_style/mesh/index.js +12 -4
- package/internal/stores/data_style/mesh/points/color.js +6 -3
- package/internal/stores/data_style/mesh/points/size.js +6 -3
- package/internal/stores/data_style/mesh/points/vertex.js +11 -6
- package/internal/stores/data_style/mesh/points/visibility.js +6 -3
- package/internal/stores/data_style/mesh/polygons/color.js +6 -3
- package/internal/stores/data_style/mesh/polygons/polygon.js +9 -6
- package/internal/stores/data_style/mesh/polygons/textures.js +6 -3
- package/internal/stores/data_style/mesh/polygons/vertex.js +10 -6
- package/internal/stores/data_style/mesh/polygons/visibility.js +6 -3
- package/internal/stores/data_style/mesh/polyhedra/color.js +6 -3
- package/internal/stores/data_style/mesh/polyhedra/polyhedron.js +14 -6
- package/internal/stores/data_style/mesh/polyhedra/vertex.js +14 -6
- package/internal/stores/data_style/mesh/polyhedra/visibility.js +6 -3
- package/internal/stores/data_style/model/common.js +24 -22
- package/internal/stores/data_style/model/edges/visibility.js +3 -3
- package/internal/stores/data_style/model/points/size.js +6 -3
- package/internal/stores/data_style/model/points/visibility.js +3 -3
- package/internal/stores/data_style/model/visibility.js +3 -2
- package/internal/stores/hybrid_viewer.js +27 -33
- package/internal/stores/hybrid_viewer_camera.js +9 -6
- package/internal/stores/hybrid_viewer_constants.js +21 -0
- package/internal/stores/hybrid_viewer_highlight.js +2 -1
- package/internal/utils/api_fetch.js +2 -1
- package/internal/utils/viewer_call.js +2 -2
- package/package.json +3 -3
- package/server/api/extensions/run.post.js +4 -2
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +12 -8
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +12 -8
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +3 -2
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +12 -8
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +12 -8
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +12 -8
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +6 -13
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +6 -13
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +3 -2
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +3 -2
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +6 -13
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +6 -4
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +6 -13
- package/tests/integration/stores/viewer.nuxt.test.js +1 -2
- package/tests/unit/components/CrsSelector.nuxt.test.js +1 -1
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +1 -1
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +1 -1
- package/tests/unit/composables/api_fetch.nuxt.test.js +5 -6
- package/tests/vitest.config.js +0 -1
|
@@ -10,8 +10,8 @@ import pTimeout from "p-timeout";
|
|
|
10
10
|
|
|
11
11
|
// Local imports
|
|
12
12
|
import { commandExistsSync, waitForReady } from "./scripts.js";
|
|
13
|
-
import { executableName, executablePath } from "./path.js";
|
|
14
13
|
import { microservicesMetadatasPath, projectMicroservices } from "./cleanup.js";
|
|
14
|
+
import { executablePath } from "./path.js";
|
|
15
15
|
|
|
16
16
|
const DEFAULT_TIMEOUT_SECONDS = 60;
|
|
17
17
|
const MILLISECONDS_PER_SECOND = 1000;
|
|
@@ -24,8 +24,8 @@ function getAvailablePort() {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
async function runScript(
|
|
27
|
-
execName,
|
|
28
27
|
execPath,
|
|
28
|
+
execName,
|
|
29
29
|
args,
|
|
30
30
|
expectedResponse,
|
|
31
31
|
timeoutSeconds = DEFAULT_TIMEOUT_SECONDS,
|
|
@@ -34,7 +34,7 @@ async function runScript(
|
|
|
34
34
|
if (commandExistsSync(execName)) {
|
|
35
35
|
command = execName;
|
|
36
36
|
} else {
|
|
37
|
-
command = path.join(executablePath(execPath
|
|
37
|
+
command = path.join(executablePath(execPath, execName));
|
|
38
38
|
}
|
|
39
39
|
console.log("runScript", command, args);
|
|
40
40
|
|
|
@@ -82,8 +82,8 @@ async function runBack(execName, execPath, args = {}) {
|
|
|
82
82
|
if (process.env.NODE_ENV === "development" || !process.env.NODE_ENV) {
|
|
83
83
|
backArgs.push("--debug");
|
|
84
84
|
}
|
|
85
|
-
console.log("runBack",
|
|
86
|
-
await runScript(
|
|
85
|
+
console.log("runBack", execPath, execName, backArgs);
|
|
86
|
+
await runScript(execPath, execName, backArgs, "Serving Flask app");
|
|
87
87
|
return port;
|
|
88
88
|
}
|
|
89
89
|
|
|
@@ -98,8 +98,8 @@ async function runViewer(execName, execPath, args = {}) {
|
|
|
98
98
|
`--data_folder_path ${projectFolderPath}`,
|
|
99
99
|
`--timeout ${0}`,
|
|
100
100
|
];
|
|
101
|
-
console.log("runViewer",
|
|
102
|
-
await runScript(
|
|
101
|
+
console.log("runViewer", execPath, execName, viewerArgs);
|
|
102
|
+
await runScript(execPath, execName, viewerArgs, "Starting factory");
|
|
103
103
|
return port;
|
|
104
104
|
}
|
|
105
105
|
|
package/app/utils/local/path.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { setTimeout } from "node:timers/promises";
|
|
5
6
|
|
|
6
7
|
// Third party imports
|
|
7
8
|
import { v4 as uuidv4 } from "uuid";
|
|
@@ -9,22 +10,31 @@ import { v4 as uuidv4 } from "uuid";
|
|
|
9
10
|
// Local imports
|
|
10
11
|
import { appMode } from "./app_mode.js";
|
|
11
12
|
|
|
12
|
-
function executablePath(
|
|
13
|
+
function executablePath(execPath, execName) {
|
|
13
14
|
const resourcesPath = process.env.RESOURCES_PATH;
|
|
14
15
|
const mode = process.env.MODE;
|
|
15
16
|
const nodeEnv = process.env.NODE_ENV;
|
|
16
|
-
console.log("[executablePath]", {
|
|
17
|
+
console.log("[executablePath]", { execPath, execName, mode, nodeEnv, resourcesPath });
|
|
17
18
|
if (mode === appMode.DESKTOP && nodeEnv === "production") {
|
|
18
|
-
|
|
19
|
+
const execPathInResources = path.join(resourcesPath, executableName(execName));
|
|
20
|
+
if (fs.existsSync(execPathInResources)) {
|
|
21
|
+
console.log(`[executablePath] Found executable in resources path: ${execPathInResources}`);
|
|
22
|
+
return execPathInResources;
|
|
23
|
+
}
|
|
19
24
|
}
|
|
20
|
-
|
|
25
|
+
const localExecPath = path.join(execPath, executableName(execName));
|
|
26
|
+
if (fs.existsSync(localExecPath)) {
|
|
27
|
+
console.log(`[executablePath] Found executable in local path: ${localExecPath}`);
|
|
28
|
+
return localExecPath;
|
|
29
|
+
}
|
|
30
|
+
throw new Error(`Executable not found: ${execName}`);
|
|
21
31
|
}
|
|
22
32
|
|
|
23
|
-
function executableName(
|
|
33
|
+
function executableName(execName) {
|
|
24
34
|
if (process.platform === "win32") {
|
|
25
|
-
return `${
|
|
35
|
+
return `${execName}.exe`;
|
|
26
36
|
}
|
|
27
|
-
return
|
|
37
|
+
return execName;
|
|
28
38
|
}
|
|
29
39
|
|
|
30
40
|
function createPath(dirPath) {
|
|
@@ -39,17 +49,62 @@ function generateProjectFolderPath(projectName) {
|
|
|
39
49
|
return path.join(os.tmpdir(), projectName.replaceAll("/", "_"), uuidv4());
|
|
40
50
|
}
|
|
41
51
|
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
52
|
+
async function lookForLocalExtensionDistPath(rootPath, extentionRepoName, frontendFile) {
|
|
53
|
+
const localExtensionPath = path.join(rootPath, "..", extentionRepoName);
|
|
54
|
+
const localExtensionDistPath = path.join(localExtensionPath, "dist");
|
|
55
|
+
|
|
56
|
+
if (!fs.existsSync(localExtensionDistPath)) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
console.log(
|
|
60
|
+
`[extensionFrontendPath] Found existing folder: ${localExtensionDistPath}, deleting it...`,
|
|
61
|
+
);
|
|
62
|
+
fs.rmSync(localExtensionDistPath, { recursive: true, force: true });
|
|
63
|
+
const now = new Date();
|
|
64
|
+
fs.utimesSync(path.join(localExtensionPath, "package.json"), now, now);
|
|
65
|
+
|
|
66
|
+
const rebuiltFilePath = path.join(localExtensionDistPath, frontendFile);
|
|
67
|
+
const MAX_DELETE_FOLDER_RETRIES = 10;
|
|
68
|
+
const MILLISECONDS_PER_RETRY = 1000;
|
|
69
|
+
|
|
70
|
+
for (let i = 0; i <= MAX_DELETE_FOLDER_RETRIES; i += 1) {
|
|
71
|
+
if (fs.existsSync(rebuiltFilePath)) {
|
|
72
|
+
console.log(`Found rebuilt file: ${rebuiltFilePath}`);
|
|
73
|
+
return rebuiltFilePath;
|
|
74
|
+
}
|
|
75
|
+
console.log(`Waiting for rebuild... attempt ${i}/${MAX_DELETE_FOLDER_RETRIES}`);
|
|
76
|
+
// oxlint-disable-next-line no-await-in-loop
|
|
77
|
+
await setTimeout(MILLISECONDS_PER_RETRY);
|
|
45
78
|
}
|
|
79
|
+
|
|
80
|
+
throw new Error(`Failed to find local extension dist path: ${rebuiltFilePath}`);
|
|
81
|
+
}
|
|
82
|
+
async function extensionFrontendPath(unzippedExtensionPath, frontendFile, rootPath, extensionId) {
|
|
83
|
+
console.log("[extensionFrontendPath]", {
|
|
84
|
+
unzippedExtensionPath,
|
|
85
|
+
frontendFile,
|
|
86
|
+
rootPath,
|
|
87
|
+
extensionId,
|
|
88
|
+
});
|
|
46
89
|
const extentionRepoName = extensionId
|
|
47
90
|
.split("-")
|
|
48
91
|
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
|
|
49
92
|
.join("-");
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
93
|
+
|
|
94
|
+
const localFilePath = await lookForLocalExtensionDistPath(
|
|
95
|
+
rootPath,
|
|
96
|
+
extentionRepoName,
|
|
97
|
+
frontendFile,
|
|
98
|
+
);
|
|
99
|
+
if (localFilePath) {
|
|
100
|
+
return localFilePath;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const unzippedfrontendFilePath = path.join(unzippedExtensionPath, frontendFile);
|
|
104
|
+
if (fs.existsSync(unzippedfrontendFilePath)) {
|
|
105
|
+
return unzippedfrontendFilePath;
|
|
106
|
+
}
|
|
107
|
+
throw new Error(`Failed to find ${unzippedfrontendFilePath}`);
|
|
53
108
|
}
|
|
54
109
|
|
|
55
110
|
export {
|
|
@@ -9,6 +9,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
9
9
|
// Local constants
|
|
10
10
|
const meshCellsCellAttributeSchemas = viewer_schemas.opengeodeweb_viewer.mesh.cells.attribute.cell;
|
|
11
11
|
|
|
12
|
+
// oxlint-disable-next-line max-lines-per-function
|
|
12
13
|
export function useMeshCellsCellAttributeStyle() {
|
|
13
14
|
const viewerStore = useViewerStore();
|
|
14
15
|
const meshCellsCommonStyle = useMeshCellsCommonStyle();
|
|
@@ -42,9 +43,13 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
function setMeshCellsCellAttributeName(id, name) {
|
|
46
|
+
const schema = meshCellsCellAttributeSchemas.name;
|
|
47
|
+
const params = { id, name };
|
|
45
48
|
return viewerStore.request(
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
{
|
|
50
|
+
schema,
|
|
51
|
+
params,
|
|
52
|
+
},
|
|
48
53
|
{
|
|
49
54
|
response_function: () => meshCellsCommonStyle.mutateMeshCellsCellStyle(id, { name }),
|
|
50
55
|
},
|
|
@@ -62,9 +67,13 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
62
67
|
const name = meshCellsCellAttributeName(id);
|
|
63
68
|
const points = getRGBPointsFromPreset(meshCellsCellAttributeColorMap(id));
|
|
64
69
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
70
|
+
const schema = meshCellsCellAttributeSchemas.color_map;
|
|
71
|
+
const params = { id, points, minimum, maximum };
|
|
65
72
|
return viewerStore.request(
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
{
|
|
74
|
+
schema,
|
|
75
|
+
params,
|
|
76
|
+
},
|
|
68
77
|
{
|
|
69
78
|
response_function: () =>
|
|
70
79
|
setMeshCellsCellAttributeStoredConfig(id, name, { minimum, maximum }),
|
|
@@ -87,9 +96,13 @@ export function useMeshCellsCellAttributeStyle() {
|
|
|
87
96
|
const points = getRGBPointsFromPreset(colorMap);
|
|
88
97
|
const { minimum, maximum } = storedConfig;
|
|
89
98
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
99
|
+
const schema = meshCellsCellAttributeSchemas.color_map;
|
|
100
|
+
const params = { id, points, minimum, maximum };
|
|
90
101
|
return viewerStore.request(
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
{
|
|
103
|
+
schema,
|
|
104
|
+
params,
|
|
105
|
+
},
|
|
93
106
|
{
|
|
94
107
|
response_function: () => setMeshCellsCellAttributeStoredConfig(id, name, { colorMap }),
|
|
95
108
|
},
|
|
@@ -6,7 +6,7 @@ import { useMeshCellsCommonStyle } from "./common";
|
|
|
6
6
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const
|
|
9
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.cells.color;
|
|
10
10
|
|
|
11
11
|
export function useMeshCellsColorStyle() {
|
|
12
12
|
const viewerStore = useViewerStore();
|
|
@@ -16,9 +16,12 @@ export function useMeshCellsColorStyle() {
|
|
|
16
16
|
return meshCellsCommonStyle.meshCellsColoring(id).color;
|
|
17
17
|
}
|
|
18
18
|
function setMeshCellsColor(id, color) {
|
|
19
|
+
const params = { id, color };
|
|
19
20
|
return viewerStore.request(
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
{
|
|
22
|
+
schema,
|
|
23
|
+
params,
|
|
24
|
+
},
|
|
22
25
|
{
|
|
23
26
|
response_function: () =>
|
|
24
27
|
meshCellsCommonStyle.mutateMeshCellsColoring(id, {
|
|
@@ -6,7 +6,7 @@ import { useMeshCellsCommonStyle } from "./common";
|
|
|
6
6
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const
|
|
9
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.cells.apply_textures;
|
|
10
10
|
|
|
11
11
|
export function useMeshCellsTexturesStyle() {
|
|
12
12
|
const viewerStore = useViewerStore();
|
|
@@ -16,9 +16,12 @@ export function useMeshCellsTexturesStyle() {
|
|
|
16
16
|
return meshCellsCommonStyle.meshCellsColoring(id).textures;
|
|
17
17
|
}
|
|
18
18
|
function setMeshCellsTextures(id, textures) {
|
|
19
|
+
const params = { id, textures };
|
|
19
20
|
return viewerStore.request(
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
{
|
|
22
|
+
schema,
|
|
23
|
+
params,
|
|
24
|
+
},
|
|
22
25
|
{
|
|
23
26
|
response_function: () =>
|
|
24
27
|
meshCellsCommonStyle.mutateMeshCellsStyle(id, {
|
|
@@ -10,6 +10,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
10
10
|
const meshCellsVertexAttributeSchemas =
|
|
11
11
|
viewer_schemas.opengeodeweb_viewer.mesh.cells.attribute.vertex;
|
|
12
12
|
|
|
13
|
+
// oxlint-disable-next-line max-lines-per-function
|
|
13
14
|
export function useMeshCellsVertexAttributeStyle() {
|
|
14
15
|
const viewerStore = useViewerStore();
|
|
15
16
|
const meshCellsCommonStyle = useMeshCellsCommonStyle();
|
|
@@ -51,9 +52,10 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
function setMeshCellsVertexAttributeName(id, name) {
|
|
55
|
+
const schema = meshCellsVertexAttributeSchemas.name;
|
|
56
|
+
const params = { id, name };
|
|
54
57
|
return viewerStore.request(
|
|
55
|
-
|
|
56
|
-
{ id, name },
|
|
58
|
+
{ schema, params },
|
|
57
59
|
{
|
|
58
60
|
response_function: () => {
|
|
59
61
|
const updates = { name };
|
|
@@ -84,9 +86,10 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
84
86
|
const name = meshCellsVertexAttributeName(id);
|
|
85
87
|
const points = getRGBPointsFromPreset(meshCellsVertexAttributeColorMap(id));
|
|
86
88
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
89
|
+
const schema = meshCellsVertexAttributeSchemas.color_map;
|
|
90
|
+
const params = { id, points, minimum, maximum };
|
|
87
91
|
return viewerStore.request(
|
|
88
|
-
|
|
89
|
-
{ id, points, minimum, maximum },
|
|
92
|
+
{ schema, params },
|
|
90
93
|
{
|
|
91
94
|
response_function: () =>
|
|
92
95
|
setMeshCellsVertexAttributeStoredConfig(id, name, { minimum, maximum }),
|
|
@@ -112,9 +115,10 @@ export function useMeshCellsVertexAttributeStyle() {
|
|
|
112
115
|
const points = getRGBPointsFromPreset(colorMap);
|
|
113
116
|
const { minimum, maximum } = storedConfig;
|
|
114
117
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
118
|
+
const schema = meshCellsVertexAttributeSchemas.color_map;
|
|
119
|
+
const params = { id, points, minimum, maximum };
|
|
115
120
|
return viewerStore.request(
|
|
116
|
-
|
|
117
|
-
{ id, points, minimum, maximum },
|
|
121
|
+
{ schema, params },
|
|
118
122
|
{
|
|
119
123
|
response_function: () => setMeshCellsVertexAttributeStoredConfig(id, name, { colorMap }),
|
|
120
124
|
},
|
|
@@ -6,7 +6,7 @@ import { useMeshCellsCommonStyle } from "./common";
|
|
|
6
6
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const
|
|
9
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.cells.visibility;
|
|
10
10
|
|
|
11
11
|
export function useMeshCellsVisibilityStyle() {
|
|
12
12
|
const viewerStore = useViewerStore();
|
|
@@ -16,9 +16,12 @@ export function useMeshCellsVisibilityStyle() {
|
|
|
16
16
|
return meshCellsCommonStyle.meshCellsStyle(id).visibility;
|
|
17
17
|
}
|
|
18
18
|
function setMeshCellsVisibility(id, visibility) {
|
|
19
|
+
const params = { id, visibility };
|
|
19
20
|
return viewerStore.request(
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
{
|
|
22
|
+
schema,
|
|
23
|
+
params,
|
|
24
|
+
},
|
|
22
25
|
{
|
|
23
26
|
response_function: () => meshCellsCommonStyle.mutateMeshCellsStyle(id, { visibility }),
|
|
24
27
|
},
|
|
@@ -6,7 +6,7 @@ import { useMeshEdgesCommonStyle } from "./common";
|
|
|
6
6
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const
|
|
9
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.edges.color;
|
|
10
10
|
|
|
11
11
|
export function useMeshEdgesColorStyle() {
|
|
12
12
|
const viewerStore = useViewerStore();
|
|
@@ -16,9 +16,12 @@ export function useMeshEdgesColorStyle() {
|
|
|
16
16
|
return meshEdgesCommonStyle.meshEdgesColoring(id).color;
|
|
17
17
|
}
|
|
18
18
|
function setMeshEdgesColor(id, color) {
|
|
19
|
+
const params = { id, color };
|
|
19
20
|
return viewerStore.request(
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
{
|
|
22
|
+
schema,
|
|
23
|
+
params,
|
|
24
|
+
},
|
|
22
25
|
{
|
|
23
26
|
response_function: () =>
|
|
24
27
|
meshEdgesCommonStyle.mutateMeshEdgesColoring(id, {
|
|
@@ -9,6 +9,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
9
9
|
// Local constants
|
|
10
10
|
const meshEdgesEdgeAttributeSchemas = viewer_schemas.opengeodeweb_viewer.mesh.edges.attribute.edge;
|
|
11
11
|
|
|
12
|
+
// oxlint-disable-next-line max-lines-per-function
|
|
12
13
|
export function useMeshEdgesEdgeAttributeStyle() {
|
|
13
14
|
const viewerStore = useViewerStore();
|
|
14
15
|
const meshEdgesCommonStyle = useMeshEdgesCommonStyle();
|
|
@@ -54,9 +55,13 @@ export function useMeshEdgesEdgeAttributeStyle() {
|
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
function setMeshEdgesEdgeAttributeName(id, name) {
|
|
58
|
+
const schema = meshEdgesEdgeAttributeSchemas.name;
|
|
59
|
+
const params = { id, name };
|
|
57
60
|
return viewerStore.request(
|
|
58
|
-
|
|
59
|
-
|
|
61
|
+
{
|
|
62
|
+
schema,
|
|
63
|
+
params,
|
|
64
|
+
},
|
|
60
65
|
{
|
|
61
66
|
response_function: () => {
|
|
62
67
|
const updates = { name };
|
|
@@ -87,9 +92,10 @@ export function useMeshEdgesEdgeAttributeStyle() {
|
|
|
87
92
|
const name = meshEdgesEdgeAttributeName(id);
|
|
88
93
|
const points = getRGBPointsFromPreset(meshEdgesEdgeAttributeColorMap(id));
|
|
89
94
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
95
|
+
const schema = meshEdgesEdgeAttributeSchemas.color_map;
|
|
96
|
+
const params = { id, points, minimum, maximum };
|
|
90
97
|
return viewerStore.request(
|
|
91
|
-
|
|
92
|
-
{ id, points, minimum, maximum },
|
|
98
|
+
{ schema, params },
|
|
93
99
|
{
|
|
94
100
|
response_function: () =>
|
|
95
101
|
setMeshEdgesEdgeAttributeStoredConfig(id, name, { minimum, maximum }),
|
|
@@ -115,9 +121,10 @@ export function useMeshEdgesEdgeAttributeStyle() {
|
|
|
115
121
|
const points = getRGBPointsFromPreset(colorMap);
|
|
116
122
|
const { minimum, maximum } = storedConfig;
|
|
117
123
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
124
|
+
const schema = meshEdgesEdgeAttributeSchemas.color_map;
|
|
125
|
+
const params = { id, points, minimum, maximum };
|
|
118
126
|
return viewerStore.request(
|
|
119
|
-
|
|
120
|
-
{ id, points, minimum, maximum },
|
|
127
|
+
{ schema, params },
|
|
121
128
|
{
|
|
122
129
|
response_function: () => setMeshEdgesEdgeAttributeStoredConfig(id, name, { colorMap }),
|
|
123
130
|
},
|
|
@@ -9,6 +9,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
9
9
|
const meshEdgesVertexAttributeSchemas =
|
|
10
10
|
viewer_schemas.opengeodeweb_viewer.mesh.edges.attribute.vertex;
|
|
11
11
|
|
|
12
|
+
// oxlint-disable-next-line max-lines-per-function
|
|
12
13
|
export function useMeshEdgesVertexAttributeStyle() {
|
|
13
14
|
const viewerStore = useViewerStore();
|
|
14
15
|
const meshEdgesCommonStyle = useMeshEdgesCommonStyle();
|
|
@@ -53,9 +54,10 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
53
54
|
return meshEdgesVertexAttribute(id).name;
|
|
54
55
|
}
|
|
55
56
|
function setMeshEdgesVertexAttributeName(id, name) {
|
|
57
|
+
const schema = meshEdgesVertexAttributeSchemas.name;
|
|
58
|
+
const params = { id, name };
|
|
56
59
|
return viewerStore.request(
|
|
57
|
-
|
|
58
|
-
{ id, name },
|
|
60
|
+
{ schema, params },
|
|
59
61
|
{
|
|
60
62
|
response_function: () => {
|
|
61
63
|
const updates = { name };
|
|
@@ -85,9 +87,10 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
85
87
|
const name = meshEdgesVertexAttributeName(id);
|
|
86
88
|
const points = getRGBPointsFromPreset(meshEdgesVertexAttributeColorMap(id));
|
|
87
89
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
90
|
+
const schema = meshEdgesVertexAttributeSchemas.color_map;
|
|
91
|
+
const params = { id, points, minimum, maximum };
|
|
88
92
|
return viewerStore.request(
|
|
89
|
-
|
|
90
|
-
{ id, points, minimum, maximum },
|
|
93
|
+
{ schema, params },
|
|
91
94
|
{
|
|
92
95
|
response_function: () =>
|
|
93
96
|
setMeshEdgesVertexAttributeStoredConfig(id, name, { minimum, maximum }),
|
|
@@ -112,9 +115,10 @@ export function useMeshEdgesVertexAttributeStyle() {
|
|
|
112
115
|
const points = getRGBPointsFromPreset(colorMap);
|
|
113
116
|
const { minimum, maximum } = storedConfig;
|
|
114
117
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
118
|
+
const schema = meshEdgesVertexAttributeSchemas.color_map;
|
|
119
|
+
const params = { id, points, minimum, maximum };
|
|
115
120
|
return viewerStore.request(
|
|
116
|
-
|
|
117
|
-
{ id, points, minimum, maximum },
|
|
121
|
+
{ schema, params },
|
|
118
122
|
{
|
|
119
123
|
response_function: () => setMeshEdgesVertexAttributeStoredConfig(id, name, { colorMap }),
|
|
120
124
|
},
|
|
@@ -5,7 +5,7 @@ import { useMeshEdgesCommonStyle } from "./common";
|
|
|
5
5
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
6
6
|
|
|
7
7
|
// Local constants
|
|
8
|
-
const
|
|
8
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.edges.visibility;
|
|
9
9
|
|
|
10
10
|
export function useMeshEdgesVisibilityStyle() {
|
|
11
11
|
const viewerStore = useViewerStore();
|
|
@@ -15,9 +15,12 @@ export function useMeshEdgesVisibilityStyle() {
|
|
|
15
15
|
return meshEdgesCommonStyle.meshEdgesStyle(id).visibility;
|
|
16
16
|
}
|
|
17
17
|
function setMeshEdgesVisibility(id, visibility) {
|
|
18
|
+
const params = { id, visibility };
|
|
18
19
|
return viewerStore.request(
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
{
|
|
21
|
+
schema,
|
|
22
|
+
params,
|
|
23
|
+
},
|
|
21
24
|
{
|
|
22
25
|
response_function: () => meshEdgesCommonStyle.mutateMeshEdgesStyle(id, { visibility }),
|
|
23
26
|
},
|
|
@@ -5,7 +5,7 @@ import { useMeshEdgesCommonStyle } from "./common";
|
|
|
5
5
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
6
6
|
|
|
7
7
|
// Local constants
|
|
8
|
-
const
|
|
8
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.edges.width;
|
|
9
9
|
|
|
10
10
|
export function useMeshEdgesWidthStyle() {
|
|
11
11
|
const viewerStore = useViewerStore();
|
|
@@ -15,9 +15,12 @@ export function useMeshEdgesWidthStyle() {
|
|
|
15
15
|
return meshEdgesCommonStyle.meshEdgesStyle(id).width;
|
|
16
16
|
}
|
|
17
17
|
function setMeshEdgesWidth(id, width) {
|
|
18
|
+
const params = { id, width };
|
|
18
19
|
return viewerStore.request(
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
{
|
|
21
|
+
schema,
|
|
22
|
+
params,
|
|
23
|
+
},
|
|
21
24
|
{
|
|
22
25
|
response_function: () => meshEdgesCommonStyle.mutateMeshEdgesStyle(id, { width }),
|
|
23
26
|
},
|
|
@@ -29,9 +29,13 @@ export function useMeshStyle() {
|
|
|
29
29
|
return dataStyleState.getStyle(id).visibility;
|
|
30
30
|
}
|
|
31
31
|
function setMeshVisibility(id, visibility) {
|
|
32
|
+
const schema = meshSchemas.visibility;
|
|
33
|
+
const params = { id, visibility };
|
|
32
34
|
return viewerStore.request(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
{
|
|
36
|
+
schema,
|
|
37
|
+
params,
|
|
38
|
+
},
|
|
35
39
|
{
|
|
36
40
|
response_function: async () => {
|
|
37
41
|
await hybridViewerStore.setVisibility(id, visibility);
|
|
@@ -46,9 +50,13 @@ export function useMeshStyle() {
|
|
|
46
50
|
}
|
|
47
51
|
|
|
48
52
|
function setMeshColor(id, color) {
|
|
53
|
+
const schema = meshSchemas.color;
|
|
54
|
+
const params = { id, color };
|
|
49
55
|
return viewerStore.request(
|
|
50
|
-
|
|
51
|
-
|
|
56
|
+
{
|
|
57
|
+
schema,
|
|
58
|
+
params,
|
|
59
|
+
},
|
|
52
60
|
{
|
|
53
61
|
response_function: () => dataStyleState.mutateStyle(id, { color }),
|
|
54
62
|
},
|
|
@@ -6,7 +6,7 @@ import { useMeshPointsCommonStyle } from "./common";
|
|
|
6
6
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const
|
|
9
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.points.color;
|
|
10
10
|
|
|
11
11
|
export function useMeshPointsColorStyle() {
|
|
12
12
|
const viewerStore = useViewerStore();
|
|
@@ -16,9 +16,12 @@ export function useMeshPointsColorStyle() {
|
|
|
16
16
|
return meshPointsCommonStyle.meshPointsColoring(id).color;
|
|
17
17
|
}
|
|
18
18
|
function setMeshPointsColor(id, color) {
|
|
19
|
+
const params = { id, color };
|
|
19
20
|
return viewerStore.request(
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
{
|
|
22
|
+
schema,
|
|
23
|
+
params,
|
|
24
|
+
},
|
|
22
25
|
{
|
|
23
26
|
response_function: () =>
|
|
24
27
|
meshPointsCommonStyle.mutateMeshPointsColoring(id, {
|
|
@@ -6,7 +6,7 @@ import { useMeshPointsCommonStyle } from "./common";
|
|
|
6
6
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const
|
|
9
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.points.size;
|
|
10
10
|
|
|
11
11
|
export function useMeshPointsSizeStyle() {
|
|
12
12
|
const viewerStore = useViewerStore();
|
|
@@ -16,9 +16,12 @@ export function useMeshPointsSizeStyle() {
|
|
|
16
16
|
return meshPointsCommonStyle.meshPointsStyle(id).size;
|
|
17
17
|
}
|
|
18
18
|
function setMeshPointsSize(id, size) {
|
|
19
|
+
const params = { id, size };
|
|
19
20
|
return viewerStore.request(
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
{
|
|
22
|
+
schema,
|
|
23
|
+
params,
|
|
24
|
+
},
|
|
22
25
|
{
|
|
23
26
|
response_function: () => meshPointsCommonStyle.mutateMeshPointsStyle(id, { size }),
|
|
24
27
|
},
|
|
@@ -10,6 +10,7 @@ import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
|
10
10
|
const meshPointsVertexAttributeSchemas =
|
|
11
11
|
viewer_schemas.opengeodeweb_viewer.mesh.points.attribute.vertex;
|
|
12
12
|
|
|
13
|
+
// oxlint-disable-next-line max-lines-per-function
|
|
13
14
|
function useMeshPointsVertexAttributeConfig() {
|
|
14
15
|
const meshPointsCommonStyle = useMeshPointsCommonStyle();
|
|
15
16
|
|
|
@@ -74,14 +75,16 @@ function useMeshPointsVertexAttributeConfig() {
|
|
|
74
75
|
};
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
// oxlint-disable-next-line max-lines-per-function
|
|
77
79
|
function useMeshPointsVertexAttributeActions() {
|
|
78
80
|
const viewerStore = useViewerStore();
|
|
79
81
|
const config = useMeshPointsVertexAttributeConfig();
|
|
80
82
|
|
|
81
83
|
function setMeshPointsVertexAttributeName(id, name) {
|
|
84
|
+
const schema = meshPointsVertexAttributeSchemas.name;
|
|
85
|
+
const params = { id, name };
|
|
82
86
|
return viewerStore.request(
|
|
83
|
-
|
|
84
|
-
{ id, name },
|
|
87
|
+
{ schema, params },
|
|
85
88
|
{
|
|
86
89
|
response_function: () => {
|
|
87
90
|
const updates = { name };
|
|
@@ -105,9 +108,10 @@ function useMeshPointsVertexAttributeActions() {
|
|
|
105
108
|
const name = config.meshPointsVertexAttributeName(id);
|
|
106
109
|
const points = getRGBPointsFromPreset(config.meshPointsVertexAttributeColorMap(id));
|
|
107
110
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
111
|
+
const schema = meshPointsVertexAttributeSchemas.color_map;
|
|
112
|
+
const params = { id, points, minimum, maximum };
|
|
108
113
|
return viewerStore.request(
|
|
109
|
-
|
|
110
|
-
{ id, points, minimum, maximum },
|
|
114
|
+
{ schema, params },
|
|
111
115
|
{
|
|
112
116
|
response_function: () =>
|
|
113
117
|
config.setMeshPointsVertexAttributeStoredConfig(id, name, { minimum, maximum }),
|
|
@@ -126,9 +130,10 @@ function useMeshPointsVertexAttributeActions() {
|
|
|
126
130
|
const points = getRGBPointsFromPreset(colorMap);
|
|
127
131
|
const { minimum, maximum } = storedConfig;
|
|
128
132
|
if (points.length > 0 && minimum !== undefined && maximum !== undefined) {
|
|
133
|
+
const schema = meshPointsVertexAttributeSchemas.color_map;
|
|
134
|
+
const params = { id, points, minimum, maximum };
|
|
129
135
|
return viewerStore.request(
|
|
130
|
-
|
|
131
|
-
{ id, points, minimum, maximum },
|
|
136
|
+
{ schema, params },
|
|
132
137
|
{
|
|
133
138
|
response_function: () =>
|
|
134
139
|
config.setMeshPointsVertexAttributeStoredConfig(id, name, { colorMap }),
|
|
@@ -6,7 +6,7 @@ import { useMeshPointsCommonStyle } from "./common";
|
|
|
6
6
|
import { useViewerStore } from "@ogw_front/stores/viewer";
|
|
7
7
|
|
|
8
8
|
// Local constants
|
|
9
|
-
const
|
|
9
|
+
const schema = viewer_schemas.opengeodeweb_viewer.mesh.points.visibility;
|
|
10
10
|
|
|
11
11
|
export function useMeshPointsVisibilityStyle() {
|
|
12
12
|
const viewerStore = useViewerStore();
|
|
@@ -16,9 +16,12 @@ export function useMeshPointsVisibilityStyle() {
|
|
|
16
16
|
return meshPointsCommonStyle.meshPointsStyle(id).visibility;
|
|
17
17
|
}
|
|
18
18
|
function setMeshPointsVisibility(id, visibility) {
|
|
19
|
+
const params = { id, visibility };
|
|
19
20
|
return viewerStore.request(
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
{
|
|
22
|
+
schema,
|
|
23
|
+
params,
|
|
24
|
+
},
|
|
22
25
|
{
|
|
23
26
|
response_function: () => meshPointsCommonStyle.mutateMeshPointsStyle(id, { visibility }),
|
|
24
27
|
},
|