@geode/opengeodeweb-front 9.11.0-rc.7 → 9.11.0-rc.9
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 +23 -0
- package/.oxlintrc.json +1 -1
- package/components/FeedBack/ErrorBanner.vue +1 -1
- package/components/FeedBack/Snackers.vue +1 -1
- package/components/HybridRenderingView.vue +38 -12
- 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/geode-opengeodeweb-back-5.10.0-rc.8.tgz +0 -0
- package/geode-opengeodeweb-viewer-1.11.0-rc.4.tgz +0 -0
- package/internal_stores/mesh/edges.js +49 -52
- package/internal_stores/mesh/index.js +20 -14
- package/internal_stores/mesh/points.js +9 -7
- package/internal_stores/mesh/polygons.js +9 -7
- package/internal_stores/mesh/polyhedra.js +8 -6
- package/internal_stores/model/blocks.js +1 -1
- package/internal_stores/model/corners.js +1 -1
- package/internal_stores/model/edges.js +1 -8
- 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 +13 -6
- package/stores/data_base.js +9 -1
- package/stores/data_style.js +7 -6
- 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/menu.js +3 -3
- package/stores/treeview.js +1 -1
- package/stores/viewer.js +5 -6
- package/tests/integration/data/fake_id/edged_curve.vtp +20 -0
- package/tests/integration/microservices/back/requirements.in +1 -0
- package/tests/integration/microservices/back/requirements.txt +75 -0
- package/tests/integration/microservices/viewer/requirements.in +1 -0
- package/tests/integration/microservices/viewer/requirements.txt +87 -0
- package/tests/integration/stores/DataStyle/mesh/Edges.nuxt.test.js +138 -0
- package/{test → tests/unit}/components/CrsSelector.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/ExtensionSelector.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/FeedBack/ErrorsBanner.nuxt.test.js +10 -3
- package/{test → tests/unit}/components/FeedBack/Snackers.nuxt.test.js +24 -21
- package/{test → tests/unit}/components/FileSelector.nuxt.test.js +5 -2
- package/{test → tests/unit}/components/FileUploader.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/Inspector/InspectionButton.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/Launcher.nuxt.test.js +9 -2
- package/{test → tests/unit}/components/MissingFilesSelector.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/ObjectSelector.nuxt.test.js +6 -3
- package/{test → tests/unit}/components/PackagesVersions.nuxt.test.js +5 -3
- package/{test → tests/unit}/components/Stepper.nuxt.test.js +1 -0
- package/{test → tests/unit}/components/Wrapper.nuxt.test.js +1 -1
- package/{test → tests/unit}/composables/api_fetch.nuxt.test.js +3 -2
- package/{test/composables/run_function_when_microservices_connected.test.js → tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js} +18 -5
- package/{test → tests/unit}/composables/upload_file.nuxt.test.js +7 -8
- package/{test → tests/unit}/stores/Feedback.nuxt.test.js +12 -8
- package/{test → tests/unit}/stores/Geode.nuxt.test.js +33 -10
- package/{test → tests/unit}/stores/Infra.nuxt.test.js +58 -25
- package/{test → tests/unit}/stores/Viewer.nuxt.test.js +101 -20
- package/{test → tests/unit}/utils/validate_schema.nuxt.test.js +3 -0
- package/tests/vitest.config.js +33 -0
- package/utils/default_styles.js +246 -0
- package/utils/local.js +180 -0
- package/geode-opengeodeweb-back-5.10.0-rc.5.tgz +0 -0
- package/geode-opengeodeweb-viewer-1.11.0-rc.3.tgz +0 -0
- package/vitest.config.js +0 -13
- /package/{test → tests/unit}/components/Inspector/ResultPanel.nuxt.test.js +0 -0
- /package/{test → tests/unit}/components/Step.nuxt.test.js +0 -0
|
@@ -7,6 +7,29 @@ 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
|
|
10
33
|
test:
|
|
11
34
|
uses: Geode-solutions/actions/.github/workflows/js-test.yml@master
|
|
12
35
|
with:
|
package/.oxlintrc.json
CHANGED
|
@@ -1,34 +1,41 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ClientOnly>
|
|
3
|
-
<div style="position: relative
|
|
3
|
+
<div class="fill-height" style="position: relative">
|
|
4
4
|
<VeaseViewToolbar />
|
|
5
5
|
<slot name="ui"></slot>
|
|
6
6
|
<v-col
|
|
7
7
|
ref="viewer"
|
|
8
|
-
style="
|
|
9
|
-
|
|
10
|
-
position: relative;
|
|
11
|
-
z-index: 0;
|
|
12
|
-
height: 100%;
|
|
13
|
-
width: 100%;
|
|
14
|
-
"
|
|
15
|
-
class="pa-0"
|
|
8
|
+
style="overflow: hidden; position: relative; z-index: 0"
|
|
9
|
+
:style="{ height: viewerHeight }"
|
|
16
10
|
@click="get_x_y"
|
|
17
|
-
@keydown.esc="
|
|
11
|
+
@keydown.esc="viewerStore.toggle_picking_mode(false)"
|
|
18
12
|
/>
|
|
19
13
|
</div>
|
|
20
14
|
</ClientOnly>
|
|
21
15
|
</template>
|
|
22
16
|
|
|
23
17
|
<script setup>
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
height: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: "100%",
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
|
|
24
25
|
const container = useTemplateRef("viewer")
|
|
25
26
|
const hybridViewerStore = useHybridViewerStore()
|
|
26
|
-
|
|
27
|
+
const viewerStore = useViewerStore()
|
|
27
28
|
const { windowWidth, windowHeight } = useWindowSize()
|
|
28
29
|
const { width, height } = useElementSize(container)
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
const viewerHeight = computed(() => props.height)
|
|
32
|
+
|
|
33
|
+
const debouncedResize = debounce(() => {
|
|
31
34
|
hybridViewerStore.resize(width.value, height.value)
|
|
35
|
+
}, 100)
|
|
36
|
+
|
|
37
|
+
watch([windowWidth, windowHeight, width, height], () => {
|
|
38
|
+
debouncedResize()
|
|
32
39
|
})
|
|
33
40
|
|
|
34
41
|
onMounted(async () => {
|
|
@@ -36,6 +43,25 @@
|
|
|
36
43
|
await hybridViewerStore.initHybridViewer()
|
|
37
44
|
await nextTick()
|
|
38
45
|
hybridViewerStore.setContainer(container)
|
|
46
|
+
debouncedResize()
|
|
39
47
|
}
|
|
40
48
|
})
|
|
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"])
|
|
41
67
|
</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 = useTreeviewStore()
|
|
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 = useFeedbackStore()
|
|
8
|
+
const geode_store = useGeodeStore()
|
|
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 = useInfraStore()
|
|
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 = useFeedbackStore()
|
|
6
|
+
const geode_store = useGeodeStore()
|
|
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 = useFeedbackStore()
|
|
6
|
+
const viewer_store = useViewerStore()
|
|
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 (client) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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)
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
if (!client) {
|
|
24
|
+
reject()
|
|
25
|
+
}
|
|
26
|
+
viewer_store.start_request()
|
|
27
|
+
client
|
|
28
|
+
.getConnection()
|
|
29
|
+
.getSession()
|
|
30
|
+
.call(schema.$id, [params])
|
|
31
|
+
.then(
|
|
32
|
+
(value) => {
|
|
33
|
+
if (response_function) {
|
|
34
|
+
response_function(value)
|
|
35
|
+
}
|
|
36
|
+
resolve()
|
|
37
|
+
},
|
|
38
|
+
(reason) => {
|
|
39
|
+
if (request_error_function) {
|
|
40
|
+
request_error_function(reason)
|
|
52
41
|
}
|
|
53
42
|
reject()
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
43
|
+
},
|
|
44
|
+
)
|
|
45
|
+
.catch((error) => {
|
|
46
|
+
feedback_store.add_error(
|
|
47
|
+
error.code,
|
|
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
|
+
})
|
|
59
60
|
})
|
|
60
|
-
return promise
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
export default viewer_call
|
|
Binary file
|
|
Binary file
|
|
@@ -2,105 +2,102 @@ 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 **/
|
|
6
5
|
const dataStyleStore = useDataStyleStore()
|
|
7
6
|
|
|
8
|
-
/** Getters **/
|
|
9
7
|
function edgesVisibility(id) {
|
|
10
8
|
return dataStyleStore.styles[id].edges.visibility
|
|
11
9
|
}
|
|
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 **/
|
|
23
10
|
function setEdgesVisibility(id, visibility) {
|
|
24
|
-
|
|
11
|
+
const edges_style = dataStyleStore.styles[id].edges
|
|
12
|
+
return viewer_call(
|
|
25
13
|
{
|
|
26
14
|
schema: mesh_edges_schemas.visibility,
|
|
27
15
|
params: { id, visibility },
|
|
28
16
|
},
|
|
29
17
|
{
|
|
30
18
|
response_function: () => {
|
|
31
|
-
|
|
32
|
-
console.log(
|
|
33
|
-
"setEdgesVisibility",
|
|
34
|
-
dataStyleStore.styles[id].edges.visibility,
|
|
35
|
-
)
|
|
19
|
+
edges_style.visibility = visibility
|
|
20
|
+
console.log(`${setEdgesVisibility.name} ${edges_style.visibility}`)
|
|
36
21
|
},
|
|
37
22
|
},
|
|
38
23
|
)
|
|
39
24
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
if (
|
|
25
|
+
|
|
26
|
+
function edgesActiveColoring(id) {
|
|
27
|
+
return dataStyleStore.styles[id].edges.coloring.active
|
|
28
|
+
}
|
|
29
|
+
async function setEdgesActiveColoring(id, type) {
|
|
30
|
+
const coloring = dataStyleStore.styles[id].edges.coloring
|
|
31
|
+
if (type == "color") {
|
|
32
|
+
setEdgesColor(id, coloring.color)
|
|
33
|
+
// else if (type == "vertex") {
|
|
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)
|
|
49
39
|
} else throw new Error("Unknown edges coloring type: " + type)
|
|
50
|
-
|
|
51
|
-
console.log(
|
|
52
|
-
"setEdgesActiveColoring",
|
|
53
|
-
dataStyleStore.styles[id].edges.coloring.active,
|
|
54
|
-
)
|
|
40
|
+
coloring.active = type
|
|
41
|
+
console.log(`${setEdgesActiveColoring.name} ${coloring.active}`)
|
|
55
42
|
}
|
|
56
43
|
|
|
44
|
+
function edgesColor(id) {
|
|
45
|
+
return dataStyleStore.styles[id].edges.coloring.color
|
|
46
|
+
}
|
|
57
47
|
function setEdgesColor(id, color) {
|
|
58
|
-
|
|
48
|
+
const coloring_style = dataStyleStore.styles[id].edges.coloring
|
|
49
|
+
return viewer_call(
|
|
59
50
|
{
|
|
60
51
|
schema: mesh_edges_schemas.color,
|
|
61
52
|
params: { id, color },
|
|
62
53
|
},
|
|
63
54
|
{
|
|
64
55
|
response_function: () => {
|
|
65
|
-
|
|
56
|
+
coloring_style.color = color
|
|
66
57
|
console.log(
|
|
67
|
-
|
|
68
|
-
dataStyleStore.styles[id].edges.coloring.color,
|
|
58
|
+
`${setEdgesColor.name} ${JSON.stringify(coloring_style.color)}`,
|
|
69
59
|
)
|
|
70
60
|
},
|
|
71
61
|
},
|
|
72
62
|
)
|
|
73
63
|
}
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
|
|
65
|
+
function edgesWidth(id) {
|
|
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(
|
|
76
71
|
{
|
|
77
|
-
schema: mesh_edges_schemas.
|
|
78
|
-
params: { id,
|
|
72
|
+
schema: mesh_edges_schemas.width,
|
|
73
|
+
params: { id, width },
|
|
79
74
|
},
|
|
80
75
|
{
|
|
81
76
|
response_function: () => {
|
|
82
|
-
|
|
83
|
-
console.log(
|
|
77
|
+
edges_style.width = width
|
|
78
|
+
console.log(`${setEdgesWidth.name} ${edges_style.width}`)
|
|
84
79
|
},
|
|
85
80
|
},
|
|
86
81
|
)
|
|
87
82
|
}
|
|
88
83
|
|
|
89
|
-
function applyEdgesStyle(id, style) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
84
|
+
async function applyEdgesStyle(id, style) {
|
|
85
|
+
return Promise.all([
|
|
86
|
+
setEdgesVisibility(id, style.visibility),
|
|
87
|
+
setEdgesActiveColoring(id, style.coloring.active),
|
|
88
|
+
// setEdgesWidth(id, style.width);
|
|
89
|
+
])
|
|
93
90
|
}
|
|
94
91
|
|
|
95
92
|
return {
|
|
96
|
-
|
|
93
|
+
applyEdgesStyle,
|
|
97
94
|
edgesActiveColoring,
|
|
98
95
|
edgesColor,
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
edgesVisibility,
|
|
97
|
+
edgesWidth,
|
|
101
98
|
setEdgesActiveColoring,
|
|
102
99
|
setEdgesColor,
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
setEdgesVisibility,
|
|
101
|
+
setEdgesWidth,
|
|
105
102
|
}
|
|
106
103
|
}
|
|
@@ -13,32 +13,38 @@ export default function useMeshStyle() {
|
|
|
13
13
|
const hybridViewerStore = useHybridViewerStore()
|
|
14
14
|
|
|
15
15
|
function setMeshVisibility(id, visibility) {
|
|
16
|
-
viewer_call(
|
|
16
|
+
return 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
|
-
dataStyleStore.styles[id].visibility = visibility
|
|
24
23
|
hybridViewerStore.setVisibility(id, visibility)
|
|
25
|
-
|
|
24
|
+
dataStyleStore.styles[id].visibility = visibility
|
|
26
25
|
},
|
|
27
26
|
},
|
|
28
27
|
)
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
function applyMeshDefaultStyle(id) {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
async function applyMeshDefaultStyle(id) {
|
|
31
|
+
return new Promise(async (resolve) => {
|
|
32
|
+
const id_style = dataStyleStore.styles[id]
|
|
33
|
+
for (const [key, value] of Object.entries(id_style)) {
|
|
34
|
+
if (key == "visibility") {
|
|
35
|
+
await setMeshVisibility(id, value)
|
|
36
|
+
} else if (key == "points") {
|
|
37
|
+
await pointsStyleStore.applyPointsStyle(id, value)
|
|
38
|
+
} else if (key == "edges") {
|
|
39
|
+
await edgesStyleStore.applyEdgesStyle(id, value)
|
|
40
|
+
} else if (key == "polygons") {
|
|
41
|
+
await polygonsStyleStore.applyPolygonsStyle(id, value)
|
|
42
|
+
} else if (key == "polyhedra") {
|
|
43
|
+
await polyhedraStyleStore.applyPolyhedraStyle(id, value)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
resolve()
|
|
47
|
+
})
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
return {
|
|
@@ -24,7 +24,7 @@ export function useMeshPointsStyle() {
|
|
|
24
24
|
|
|
25
25
|
/** Actions **/
|
|
26
26
|
function setPointsVisibility(id, visibility) {
|
|
27
|
-
viewer_call(
|
|
27
|
+
return 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
|
-
viewer_call(
|
|
45
|
+
return 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
|
-
viewer_call(
|
|
62
|
+
return 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
|
-
viewer_call(
|
|
79
|
+
return viewer_call(
|
|
80
80
|
{
|
|
81
81
|
schema: viewer_schemas.opengeodeweb_viewer.mesh.points.size,
|
|
82
82
|
params: { id, size },
|
|
@@ -108,9 +108,11 @@ export function useMeshPointsStyle() {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
function applyPointsStyle(id, style) {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
return Promise.all([
|
|
112
|
+
setPointsVisibility(id, style.visibility),
|
|
113
|
+
setPointsActiveColoring(id, style.coloring.active),
|
|
114
|
+
setPointsSize(id, style.size),
|
|
115
|
+
])
|
|
114
116
|
}
|
|
115
117
|
|
|
116
118
|
return {
|
|
@@ -27,7 +27,7 @@ export function useMeshPolygonsStyle() {
|
|
|
27
27
|
|
|
28
28
|
/** Actions **/
|
|
29
29
|
function setPolygonsVisibility(id, visibility) {
|
|
30
|
-
viewer_call(
|
|
30
|
+
return 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
|
-
viewer_call(
|
|
70
|
+
return 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
|
-
viewer_call(
|
|
87
|
+
return 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
|
-
viewer_call(
|
|
104
|
+
return 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
|
-
viewer_call(
|
|
121
|
+
return viewer_call(
|
|
122
122
|
{
|
|
123
123
|
schema: mesh_polygons_schemas.polygon_attribute,
|
|
124
124
|
params: { id, ...polygon_attribute },
|
|
@@ -137,8 +137,10 @@ export function useMeshPolygonsStyle() {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
function applyPolygonsStyle(id, style) {
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
return Promise.all([
|
|
141
|
+
setPolygonsVisibility(id, style.visibility),
|
|
142
|
+
setPolygonsActiveColoring(id, style.coloring.active),
|
|
143
|
+
])
|
|
142
144
|
}
|
|
143
145
|
|
|
144
146
|
return {
|