Skip to content

Commit a37cdc3

Browse files
pr comments
1 parent 18f8e70 commit a37cdc3

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

internal_stores/mesh/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ export default function useMeshStyle() {
1010
const edgesStyleStore = useMeshEdgesStyle()
1111
const polygonsStyleStore = useMeshPolygonsStyle()
1212
const polyhedraStyleStore = useMeshPolyhedraStyle()
13+
const hybridViewerStore = useHybridViewerStore()
1314

1415
function setMeshVisibility(id, visibility) {
15-
viewer_call(
16+
return viewer_call(
1617
{
1718
schema: viewer_schemas.opengeodeweb_viewer.mesh.visibility,
1819
params: { id, visibility },
1920
},
2021
{
2122
response_function: () => {
23+
hybridViewerStore.setVisibility(id, visibility)
2224
dataStyleStore.styles[id].visibility = visibility
2325
console.log("setMeshVisibility", dataStyleStore.styles[id].visibility)
2426
},

internal_stores/model/edges.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,6 @@ export function useModelEdgesStyle() {
99
}
1010

1111
function setModelEdgesVisibility(id, visibility) {
12-
// if (!dataStyleStore.styles[id]) {
13-
// dataStyleStore.styles[id] = {}
14-
// }
15-
// if (!dataStyleStore.styles[id].edges) {
16-
// dataStyleStore.styles[id].edges = {}
17-
// }
18-
1912
return viewer_call(
2013
{
2114
schema: model_edges_schemas.visibility,

internal_stores/model/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export default function useModelStyle() {
1616
const blocksStyleStore = useBlocksStyle()
1717
const modelEdgesStore = useModelEdgesStyle()
1818
const modelPointsStore = useModelPointsStyle()
19+
const hybridViewerStore = useHybridViewerStore()
1920

2021
/** Getters **/
2122
function modelVisibility(id) {
@@ -62,14 +63,15 @@ export default function useModelStyle() {
6263
}
6364

6465
function setModelVisibility(id, visibility) {
65-
viewer_call(
66+
return viewer_call(
6667
{
6768
schema: viewer_schemas.opengeodeweb_viewer.model.visibility,
6869
params: { id, visibility },
6970
},
7071
{
7172
response_function: () => {
7273
dataStyleStore.styles[id].visibility = visibility
74+
hybridViewerStore.setVisibility(id, visibility)
7375
console.log("setModelVisibility", visibility)
7476
},
7577
},

stores/data_base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const useDataBaseStore = defineStore("dataBase", () => {
4343

4444
/** Actions **/
4545
async function registerObject(id, file_name, viewer_object) {
46-
await viewer_call({
46+
return viewer_call({
4747
schema: viewer_schemas.opengeodeweb_viewer.generic.register,
4848
params: { id, file_name, viewer_object },
4949
})

0 commit comments

Comments
 (0)