@geode/opengeodeweb-front 9.11.0-rc.9 → 9.11.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/.github/workflows/test.yml +0 -23
- package/components/FeedBack/ErrorBanner.vue +1 -1
- package/components/FeedBack/Snackers.vue +1 -1
- package/components/HybridRenderingView.vue +12 -38
- package/components/Launcher.vue +1 -1
- package/components/PackagesVersions.vue +1 -1
- package/components/Recaptcha.vue +1 -1
- package/components/RemoteRenderingView.vue +1 -1
- package/components/Viewer/BreadCrumb.vue +1 -1
- package/components/Viewer/Tree/ObjectTree.vue +1 -1
- package/components/Viewer/TreeObject.vue +1 -1
- package/components/Wrapper.vue +1 -1
- package/composables/api_fetch.js +2 -2
- package/composables/run_function_when_microservices_connected.js +1 -1
- package/composables/upload_file.js +2 -2
- package/composables/viewer_call.js +38 -38
- package/internal_stores/mesh/edges.js +52 -49
- package/internal_stores/mesh/index.js +14 -20
- package/internal_stores/mesh/points.js +7 -9
- package/internal_stores/mesh/polygons.js +7 -9
- package/internal_stores/mesh/polyhedra.js +6 -8
- package/internal_stores/model/blocks.js +1 -1
- package/internal_stores/model/corners.js +1 -1
- package/internal_stores/model/edges.js +8 -1
- package/internal_stores/model/index.js +1 -1
- package/internal_stores/model/lines.js +2 -2
- package/internal_stores/model/points.js +2 -2
- package/internal_stores/model/surfaces.js +1 -1
- package/package.json +6 -13
- package/stores/data_base.js +1 -9
- package/stores/data_style.js +6 -7
- package/stores/feedback.js +1 -1
- package/stores/geode.js +5 -5
- package/stores/hybrid_viewer.js +1 -1
- package/stores/infra.js +10 -10
- package/stores/treeview.js +1 -1
- package/stores/viewer.js +6 -5
- package/{tests/unit → test}/components/CrsSelector.nuxt.test.js +3 -6
- package/{tests/unit → test}/components/ExtensionSelector.nuxt.test.js +3 -6
- package/{tests/unit → test}/components/FeedBack/ErrorsBanner.nuxt.test.js +3 -10
- package/{tests/unit → test}/components/FeedBack/Snackers.nuxt.test.js +21 -24
- package/{tests/unit → test}/components/FileSelector.nuxt.test.js +2 -5
- package/{tests/unit → test}/components/FileUploader.nuxt.test.js +3 -6
- package/{tests/unit → test}/components/Inspector/InspectionButton.nuxt.test.js +3 -6
- package/{tests/unit → test}/components/Launcher.nuxt.test.js +2 -9
- package/{tests/unit → test}/components/MissingFilesSelector.nuxt.test.js +3 -6
- package/{tests/unit → test}/components/ObjectSelector.nuxt.test.js +3 -6
- package/{tests/unit → test}/components/PackagesVersions.nuxt.test.js +3 -5
- package/{tests/unit → test}/components/Stepper.nuxt.test.js +0 -1
- package/{tests/unit → test}/components/Wrapper.nuxt.test.js +1 -1
- package/{tests/unit → test}/composables/api_fetch.nuxt.test.js +2 -3
- package/{tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js → test/composables/run_function_when_microservices_connected.test.js} +5 -18
- package/{tests/unit → test}/composables/upload_file.nuxt.test.js +8 -7
- package/{tests/unit → test}/stores/Feedback.nuxt.test.js +8 -12
- package/{tests/unit → test}/stores/Geode.nuxt.test.js +10 -33
- package/{tests/unit → test}/stores/Infra.nuxt.test.js +25 -58
- package/{tests/unit → test}/stores/Viewer.nuxt.test.js +20 -101
- package/{tests/unit → test}/utils/validate_schema.nuxt.test.js +0 -3
- package/vitest.config.js +13 -0
- package/geode-opengeodeweb-back-5.10.0-rc.8.tgz +0 -0
- package/geode-opengeodeweb-viewer-1.11.0-rc.4.tgz +0 -0
- package/tests/integration/data/fake_id/edged_curve.vtp +0 -20
- package/tests/integration/microservices/back/requirements.in +0 -1
- package/tests/integration/microservices/back/requirements.txt +0 -75
- package/tests/integration/microservices/viewer/requirements.in +0 -1
- package/tests/integration/microservices/viewer/requirements.txt +0 -87
- package/tests/integration/stores/DataStyle/mesh/Edges.nuxt.test.js +0 -138
- package/tests/vitest.config.js +0 -33
- package/utils/default_styles.js +0 -246
- package/utils/local.js +0 -180
- /package/{tests/unit → test}/components/Inspector/ResultPanel.nuxt.test.js +0 -0
- /package/{tests/unit → test}/components/Step.nuxt.test.js +0 -0
|
@@ -7,29 +7,6 @@ on:
|
|
|
7
7
|
- next
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
|
-
test-integration:
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
- name: Node setup
|
|
15
|
-
uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 22
|
|
18
|
-
- name: Python setup
|
|
19
|
-
uses: actions/setup-python@v5
|
|
20
|
-
with:
|
|
21
|
-
python-version: 3.12
|
|
22
|
-
- name: Install python dependencies
|
|
23
|
-
run: |
|
|
24
|
-
cd ./tests/integration/microservices/viewer
|
|
25
|
-
python3 -m venv venv
|
|
26
|
-
source venv/bin/activate
|
|
27
|
-
pip install --extra-index-url https://wheels.vtk.org -r requirements.txt
|
|
28
|
-
- name: Install and run tests
|
|
29
|
-
run: |
|
|
30
|
-
npm i
|
|
31
|
-
|
|
32
|
-
npm run test:integration
|
|
33
10
|
test:
|
|
34
11
|
uses: Geode-solutions/actions/.github/workflows/js-test.yml@master
|
|
35
12
|
with:
|
|
@@ -1,41 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ClientOnly>
|
|
3
|
-
<div
|
|
3
|
+
<div style="position: relative; width: 100%; height: calc(100vh - 75px)">
|
|
4
4
|
<VeaseViewToolbar />
|
|
5
5
|
<slot name="ui"></slot>
|
|
6
6
|
<v-col
|
|
7
7
|
ref="viewer"
|
|
8
|
-
style="
|
|
9
|
-
|
|
8
|
+
style="
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
position: relative;
|
|
11
|
+
z-index: 0;
|
|
12
|
+
height: 100%;
|
|
13
|
+
width: 100%;
|
|
14
|
+
"
|
|
15
|
+
class="pa-0"
|
|
10
16
|
@click="get_x_y"
|
|
11
|
-
@keydown.esc="
|
|
17
|
+
@keydown.esc="viewer_store.toggle_picking_mode(false)"
|
|
12
18
|
/>
|
|
13
19
|
</div>
|
|
14
20
|
</ClientOnly>
|
|
15
21
|
</template>
|
|
16
22
|
|
|
17
23
|
<script setup>
|
|
18
|
-
const props = defineProps({
|
|
19
|
-
height: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: "100%",
|
|
22
|
-
},
|
|
23
|
-
})
|
|
24
|
-
|
|
25
24
|
const container = useTemplateRef("viewer")
|
|
26
25
|
const hybridViewerStore = useHybridViewerStore()
|
|
27
|
-
|
|
26
|
+
|
|
28
27
|
const { windowWidth, windowHeight } = useWindowSize()
|
|
29
28
|
const { width, height } = useElementSize(container)
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const debouncedResize = debounce(() => {
|
|
30
|
+
watch([windowWidth, windowHeight, height, width], () => {
|
|
34
31
|
hybridViewerStore.resize(width.value, height.value)
|
|
35
|
-
}, 100)
|
|
36
|
-
|
|
37
|
-
watch([windowWidth, windowHeight, width, height], () => {
|
|
38
|
-
debouncedResize()
|
|
39
32
|
})
|
|
40
33
|
|
|
41
34
|
onMounted(async () => {
|
|
@@ -43,25 +36,6 @@
|
|
|
43
36
|
await hybridViewerStore.initHybridViewer()
|
|
44
37
|
await nextTick()
|
|
45
38
|
hybridViewerStore.setContainer(container)
|
|
46
|
-
debouncedResize()
|
|
47
39
|
}
|
|
48
40
|
})
|
|
49
|
-
|
|
50
|
-
function debounce(func, wait) {
|
|
51
|
-
let timeout
|
|
52
|
-
return function executedFunction(...args) {
|
|
53
|
-
const later = () => {
|
|
54
|
-
clearTimeout(timeout)
|
|
55
|
-
func(...args)
|
|
56
|
-
}
|
|
57
|
-
clearTimeout(timeout)
|
|
58
|
-
timeout = setTimeout(later, wait)
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function get_x_y(event) {
|
|
63
|
-
emit("click", event)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
defineEmits(["click"])
|
|
67
41
|
</script>
|
package/components/Launcher.vue
CHANGED
package/components/Recaptcha.vue
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
44
|
<script setup>
|
|
45
|
-
const treeviewStore =
|
|
45
|
+
const treeviewStore = use_treeview_store()
|
|
46
46
|
const menuStore = useMenuStore()
|
|
47
47
|
const cardContainer = useTemplateRef("cardContainer")
|
|
48
48
|
const containerWidth = ref(window.innerWidth)
|
package/components/Wrapper.vue
CHANGED
package/composables/api_fetch.js
CHANGED
|
@@ -4,8 +4,8 @@ export function api_fetch(
|
|
|
4
4
|
{ schema, params },
|
|
5
5
|
{ request_error_function, response_function, response_error_function } = {},
|
|
6
6
|
) {
|
|
7
|
-
const feedback_store =
|
|
8
|
-
const geode_store =
|
|
7
|
+
const feedback_store = use_feedback_store()
|
|
8
|
+
const geode_store = use_geode_store()
|
|
9
9
|
|
|
10
10
|
const body = params || {}
|
|
11
11
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export function run_function_when_microservices_connected(function_to_run) {
|
|
2
|
-
const infra_store =
|
|
2
|
+
const infra_store = use_infra_store()
|
|
3
3
|
const { microservices_connected } = storeToRefs(infra_store)
|
|
4
4
|
if (microservices_connected.value) {
|
|
5
5
|
function_to_run()
|
|
@@ -2,8 +2,8 @@ export async function upload_file(
|
|
|
2
2
|
{ route, file },
|
|
3
3
|
{ request_error_function, response_function, response_error_function } = {},
|
|
4
4
|
) {
|
|
5
|
-
const feedback_store =
|
|
6
|
-
const geode_store =
|
|
5
|
+
const feedback_store = use_feedback_store()
|
|
6
|
+
const geode_store = use_geode_store()
|
|
7
7
|
if (!(file instanceof File)) {
|
|
8
8
|
throw new Error("file must be a instance of File")
|
|
9
9
|
}
|
|
@@ -2,8 +2,8 @@ export function viewer_call(
|
|
|
2
2
|
{ schema, params = {} },
|
|
3
3
|
{ request_error_function, response_function, response_error_function } = {},
|
|
4
4
|
) {
|
|
5
|
-
const feedback_store =
|
|
6
|
-
const viewer_store =
|
|
5
|
+
const feedback_store = use_feedback_store()
|
|
6
|
+
const viewer_store = use_viewer_store()
|
|
7
7
|
|
|
8
8
|
const { valid, error } = validate_schema(schema, params)
|
|
9
9
|
|
|
@@ -19,45 +19,45 @@ export function viewer_call(
|
|
|
19
19
|
|
|
20
20
|
const client = viewer_store.client
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
22
|
+
let promise = new Promise((resolve, reject) => {
|
|
23
|
+
if (client) {
|
|
24
|
+
viewer_store.start_request()
|
|
25
|
+
client
|
|
26
|
+
.getConnection()
|
|
27
|
+
.getSession()
|
|
28
|
+
.call(schema.$id, [params])
|
|
29
|
+
.then(
|
|
30
|
+
(value) => {
|
|
31
|
+
if (response_function) {
|
|
32
|
+
response_function(value)
|
|
33
|
+
}
|
|
34
|
+
resolve()
|
|
35
|
+
},
|
|
36
|
+
(reason) => {
|
|
37
|
+
if (request_error_function) {
|
|
38
|
+
request_error_function(reason)
|
|
39
|
+
}
|
|
40
|
+
reject()
|
|
41
|
+
},
|
|
42
|
+
)
|
|
43
|
+
.catch((error) => {
|
|
44
|
+
feedback_store.add_error(
|
|
45
|
+
error.code,
|
|
46
|
+
schema.route,
|
|
47
|
+
error.message,
|
|
48
|
+
error.message,
|
|
49
|
+
)
|
|
50
|
+
if (response_error_function) {
|
|
51
|
+
response_error_function(error)
|
|
41
52
|
}
|
|
42
53
|
reject()
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
schema.route,
|
|
49
|
-
error.message,
|
|
50
|
-
error.message,
|
|
51
|
-
)
|
|
52
|
-
if (response_error_function) {
|
|
53
|
-
response_error_function(error)
|
|
54
|
-
}
|
|
55
|
-
reject()
|
|
56
|
-
})
|
|
57
|
-
.finally(() => {
|
|
58
|
-
viewer_store.stop_request()
|
|
59
|
-
})
|
|
54
|
+
})
|
|
55
|
+
.finally(() => {
|
|
56
|
+
viewer_store.stop_request()
|
|
57
|
+
})
|
|
58
|
+
}
|
|
60
59
|
})
|
|
60
|
+
return promise
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export default viewer_call
|
|
@@ -2,102 +2,105 @@ import viewer_schemas from "@geode/opengeodeweb-viewer/opengeodeweb_viewer_schem
|
|
|
2
2
|
const mesh_edges_schemas = viewer_schemas.opengeodeweb_viewer.mesh.edges
|
|
3
3
|
|
|
4
4
|
export function useMeshEdgesStyle() {
|
|
5
|
+
/** State **/
|
|
5
6
|
const dataStyleStore = useDataStyleStore()
|
|
6
7
|
|
|
8
|
+
/** Getters **/
|
|
7
9
|
function edgesVisibility(id) {
|
|
8
10
|
return dataStyleStore.styles[id].edges.visibility
|
|
9
11
|
}
|
|
12
|
+
function edgesActiveColoring(id) {
|
|
13
|
+
return dataStyleStore.styles[id].edges.coloring.active
|
|
14
|
+
}
|
|
15
|
+
function edgesColor(id) {
|
|
16
|
+
return dataStyleStore.styles[id].edges.coloring.color
|
|
17
|
+
}
|
|
18
|
+
function edgesSize(id) {
|
|
19
|
+
return dataStyleStore.styles[id].edges.size
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Actions **/
|
|
10
23
|
function setEdgesVisibility(id, visibility) {
|
|
11
|
-
|
|
12
|
-
return viewer_call(
|
|
24
|
+
viewer_call(
|
|
13
25
|
{
|
|
14
26
|
schema: mesh_edges_schemas.visibility,
|
|
15
27
|
params: { id, visibility },
|
|
16
28
|
},
|
|
17
29
|
{
|
|
18
30
|
response_function: () => {
|
|
19
|
-
|
|
20
|
-
console.log(
|
|
31
|
+
dataStyleStore.styles[id].edges.visibility = visibility
|
|
32
|
+
console.log(
|
|
33
|
+
"setEdgesVisibility",
|
|
34
|
+
dataStyleStore.styles[id].edges.visibility,
|
|
35
|
+
)
|
|
21
36
|
},
|
|
22
37
|
},
|
|
23
38
|
)
|
|
24
39
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (type == "
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
// const vertex = coloring.vertex
|
|
35
|
-
// if (vertex !== null) setEdgesVertexAttribute(id, vertex)
|
|
36
|
-
// } else if (type == "edges") {
|
|
37
|
-
// const edges = coloring.edges
|
|
38
|
-
// if (edges !== null) setEdgesEdgeAttribute(id, edges)
|
|
40
|
+
function setEdgesActiveColoring(id, type) {
|
|
41
|
+
if (type == "color")
|
|
42
|
+
setEdgesColor(id, dataStyleStore.styles[id].edges.coloring.color)
|
|
43
|
+
else if (type == "vertex") {
|
|
44
|
+
const vertex = dataStyleStore.styles[id].edges.coloring.vertex
|
|
45
|
+
if (vertex !== null) setEdgesVertexAttribute(id, vertex)
|
|
46
|
+
} else if (type == "edges") {
|
|
47
|
+
const edges = dataStyleStore.styles[id].edges.coloring.edges
|
|
48
|
+
if (edges !== null) setEdgesEdgeAttribute(id, edges)
|
|
39
49
|
} else throw new Error("Unknown edges coloring type: " + type)
|
|
40
|
-
coloring.active = type
|
|
41
|
-
console.log(
|
|
50
|
+
dataStyleStore.styles[id].edges.coloring.active = type
|
|
51
|
+
console.log(
|
|
52
|
+
"setEdgesActiveColoring",
|
|
53
|
+
dataStyleStore.styles[id].edges.coloring.active,
|
|
54
|
+
)
|
|
42
55
|
}
|
|
43
56
|
|
|
44
|
-
function edgesColor(id) {
|
|
45
|
-
return dataStyleStore.styles[id].edges.coloring.color
|
|
46
|
-
}
|
|
47
57
|
function setEdgesColor(id, color) {
|
|
48
|
-
|
|
49
|
-
return viewer_call(
|
|
58
|
+
viewer_call(
|
|
50
59
|
{
|
|
51
60
|
schema: mesh_edges_schemas.color,
|
|
52
61
|
params: { id, color },
|
|
53
62
|
},
|
|
54
63
|
{
|
|
55
64
|
response_function: () => {
|
|
56
|
-
|
|
65
|
+
dataStyleStore.styles[id].edges.coloring.color = color
|
|
57
66
|
console.log(
|
|
58
|
-
|
|
67
|
+
"setEdgesColor",
|
|
68
|
+
dataStyleStore.styles[id].edges.coloring.color,
|
|
59
69
|
)
|
|
60
70
|
},
|
|
61
71
|
},
|
|
62
72
|
)
|
|
63
73
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return dataStyleStore.styles[id].edges.size
|
|
67
|
-
}
|
|
68
|
-
function setEdgesWidth(id, width) {
|
|
69
|
-
const edges_style = dataStyleStore.styles[id].edges
|
|
70
|
-
return viewer_call(
|
|
74
|
+
function setEdgesSize(id, size) {
|
|
75
|
+
viewer_call(
|
|
71
76
|
{
|
|
72
|
-
schema: mesh_edges_schemas.
|
|
73
|
-
params: { id,
|
|
77
|
+
schema: mesh_edges_schemas.size,
|
|
78
|
+
params: { id, size },
|
|
74
79
|
},
|
|
75
80
|
{
|
|
76
81
|
response_function: () => {
|
|
77
|
-
|
|
78
|
-
console.log(
|
|
82
|
+
dataStyleStore.styles[id].edges.size = size
|
|
83
|
+
console.log("setEdgesSize", dataStyleStore.styles[id].edges.size)
|
|
79
84
|
},
|
|
80
85
|
},
|
|
81
86
|
)
|
|
82
87
|
}
|
|
83
88
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
// setEdgesWidth(id, style.width);
|
|
89
|
-
])
|
|
89
|
+
function applyEdgesStyle(id, style) {
|
|
90
|
+
setEdgesVisibility(id, style.visibility)
|
|
91
|
+
setEdgesActiveColoring(id, style.coloring.active)
|
|
92
|
+
// setEdgesSize(id, style.size);
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
return {
|
|
93
|
-
|
|
96
|
+
edgesVisibility,
|
|
94
97
|
edgesActiveColoring,
|
|
95
98
|
edgesColor,
|
|
96
|
-
|
|
97
|
-
|
|
99
|
+
edgesSize,
|
|
100
|
+
setEdgesVisibility,
|
|
98
101
|
setEdgesActiveColoring,
|
|
99
102
|
setEdgesColor,
|
|
100
|
-
|
|
101
|
-
|
|
103
|
+
setEdgesSize,
|
|
104
|
+
applyEdgesStyle,
|
|
102
105
|
}
|
|
103
106
|
}
|
|
@@ -13,38 +13,32 @@ export default function useMeshStyle() {
|
|
|
13
13
|
const hybridViewerStore = useHybridViewerStore()
|
|
14
14
|
|
|
15
15
|
function setMeshVisibility(id, visibility) {
|
|
16
|
-
|
|
16
|
+
viewer_call(
|
|
17
17
|
{
|
|
18
18
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.visibility,
|
|
19
19
|
params: { id, visibility },
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
response_function: () => {
|
|
23
|
-
hybridViewerStore.setVisibility(id, visibility)
|
|
24
23
|
dataStyleStore.styles[id].visibility = visibility
|
|
24
|
+
hybridViewerStore.setVisibility(id, visibility)
|
|
25
|
+
console.log("setMeshVisibility", dataStyleStore.styles[id].visibility)
|
|
25
26
|
},
|
|
26
27
|
},
|
|
27
28
|
)
|
|
28
29
|
}
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
await polygonsStyleStore.applyPolygonsStyle(id, value)
|
|
42
|
-
} else if (key == "polyhedra") {
|
|
43
|
-
await polyhedraStyleStore.applyPolyhedraStyle(id, value)
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
resolve()
|
|
47
|
-
})
|
|
31
|
+
function applyMeshDefaultStyle(id) {
|
|
32
|
+
const id_style = dataStyleStore.styles[id]
|
|
33
|
+
for (const [key, value] of Object.entries(id_style)) {
|
|
34
|
+
if (key == "visibility") setMeshVisibility(id, value)
|
|
35
|
+
else if (key == "points") pointsStyleStore.applyPointsStyle(id, value)
|
|
36
|
+
else if (key == "edges") edgesStyleStore.applyEdgesStyle(id, value)
|
|
37
|
+
else if (key == "polygons")
|
|
38
|
+
polygonsStyleStore.applyPolygonsStyle(id, value)
|
|
39
|
+
else if (key == "polyhedra")
|
|
40
|
+
polyhedraStyleStore.applyPolyhedraStyle(id, value)
|
|
41
|
+
}
|
|
48
42
|
}
|
|
49
43
|
|
|
50
44
|
return {
|
|
@@ -24,7 +24,7 @@ export function useMeshPointsStyle() {
|
|
|
24
24
|
|
|
25
25
|
/** Actions **/
|
|
26
26
|
function setPointsVisibility(id, visibility) {
|
|
27
|
-
|
|
27
|
+
viewer_call(
|
|
28
28
|
{
|
|
29
29
|
schema: mesh_points_schemas.visibility,
|
|
30
30
|
params: { id, visibility },
|
|
@@ -42,7 +42,7 @@ export function useMeshPointsStyle() {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
function setPointsColor(id, color) {
|
|
45
|
-
|
|
45
|
+
viewer_call(
|
|
46
46
|
{
|
|
47
47
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.points.color,
|
|
48
48
|
params: { id, color },
|
|
@@ -59,7 +59,7 @@ export function useMeshPointsStyle() {
|
|
|
59
59
|
)
|
|
60
60
|
}
|
|
61
61
|
function setPointsVertexAttribute(id, vertex_attribute) {
|
|
62
|
-
|
|
62
|
+
viewer_call(
|
|
63
63
|
{
|
|
64
64
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.points.vertex_attribute,
|
|
65
65
|
params: { id, ...vertex_attribute },
|
|
@@ -76,7 +76,7 @@ export function useMeshPointsStyle() {
|
|
|
76
76
|
)
|
|
77
77
|
}
|
|
78
78
|
function setPointsSize(id, size) {
|
|
79
|
-
|
|
79
|
+
viewer_call(
|
|
80
80
|
{
|
|
81
81
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.points.size,
|
|
82
82
|
params: { id, size },
|
|
@@ -108,11 +108,9 @@ export function useMeshPointsStyle() {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
function applyPointsStyle(id, style) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
setPointsSize(id, style.size),
|
|
115
|
-
])
|
|
111
|
+
setPointsVisibility(id, style.visibility)
|
|
112
|
+
setPointsActiveColoring(id, style.coloring.active)
|
|
113
|
+
setPointsSize(id, style.size)
|
|
116
114
|
}
|
|
117
115
|
|
|
118
116
|
return {
|
|
@@ -27,7 +27,7 @@ export function useMeshPolygonsStyle() {
|
|
|
27
27
|
|
|
28
28
|
/** Actions **/
|
|
29
29
|
function setPolygonsVisibility(id, visibility) {
|
|
30
|
-
|
|
30
|
+
viewer_call(
|
|
31
31
|
{
|
|
32
32
|
schema: mesh_polygons_schemas.visibility,
|
|
33
33
|
params: { id, visibility },
|
|
@@ -67,7 +67,7 @@ export function useMeshPolygonsStyle() {
|
|
|
67
67
|
)
|
|
68
68
|
}
|
|
69
69
|
function setPolygonsColor(id, color) {
|
|
70
|
-
|
|
70
|
+
viewer_call(
|
|
71
71
|
{
|
|
72
72
|
schema: mesh_polygons_schemas.color,
|
|
73
73
|
params: { id, color },
|
|
@@ -84,7 +84,7 @@ export function useMeshPolygonsStyle() {
|
|
|
84
84
|
)
|
|
85
85
|
}
|
|
86
86
|
function setPolygonsTextures(id, textures) {
|
|
87
|
-
|
|
87
|
+
viewer_call(
|
|
88
88
|
{
|
|
89
89
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.apply_textures,
|
|
90
90
|
params: { id, textures },
|
|
@@ -101,7 +101,7 @@ export function useMeshPolygonsStyle() {
|
|
|
101
101
|
)
|
|
102
102
|
}
|
|
103
103
|
function setPolygonsVertexAttribute(id, vertex_attribute) {
|
|
104
|
-
|
|
104
|
+
viewer_call(
|
|
105
105
|
{
|
|
106
106
|
schema: mesh_polygons_schemas.vertex_attribute,
|
|
107
107
|
params: { id, ...vertex_attribute },
|
|
@@ -118,7 +118,7 @@ export function useMeshPolygonsStyle() {
|
|
|
118
118
|
)
|
|
119
119
|
}
|
|
120
120
|
function setPolygonsPolygonAttribute(id, polygon_attribute) {
|
|
121
|
-
|
|
121
|
+
viewer_call(
|
|
122
122
|
{
|
|
123
123
|
schema: mesh_polygons_schemas.polygon_attribute,
|
|
124
124
|
params: { id, ...polygon_attribute },
|
|
@@ -137,10 +137,8 @@ export function useMeshPolygonsStyle() {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
function applyPolygonsStyle(id, style) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
setPolygonsActiveColoring(id, style.coloring.active),
|
|
143
|
-
])
|
|
140
|
+
setPolygonsVisibility(id, style.visibility)
|
|
141
|
+
setPolygonsActiveColoring(id, style.coloring.active)
|
|
144
142
|
}
|
|
145
143
|
|
|
146
144
|
return {
|