Skip to content

Commit 0802579

Browse files
committed
Merge branch 'feat/save_and_load' of https://github.com/Geode-solutions/OpenGeodeWeb-Front into feat/save_and_load
2 parents fdaca90 + 2ad8f46 commit 0802579

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

composables/project_manager.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ export function useProjectManager() {
4949
})
5050

5151
const snapshot = result?.snapshot ?? {}
52-
console.log("[ProjectManager] snapshot keys:", Object.keys(snapshot || {}))
52+
console.log(
53+
"[ProjectManager] snapshot keys:",
54+
Object.keys(snapshot || {}),
55+
)
5356

5457
await viewer_call({
5558
schema: viewer_schemas.opengeodeweb_viewer.import_project,

stores/data_base.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const useDataBaseStore = defineStore("dataBase", () => {
4747
params: { id },
4848
})
4949
}
50-
50+
5151
const treeviewStore = useTreeviewStore()
5252
const hybridViewerStore = useHybridViewerStore()
5353

@@ -139,7 +139,10 @@ export const useDataBaseStore = defineStore("dataBase", () => {
139139
async function importStores(snapshot) {
140140
await hybridViewerStore.initHybridViewer()
141141
hybridViewerStore.clear()
142-
console.log("[DataBase] importStores entries:", Object.keys(snapshot?.db || {}))
142+
console.log(
143+
"[DataBase] importStores entries:",
144+
Object.keys(snapshot?.db || {}),
145+
)
143146
for (const [id, item] of Object.entries(snapshot?.db || {})) {
144147
await registerObject(id)
145148
await addItem(id, item)
@@ -187,7 +190,7 @@ export const useDataBaseStore = defineStore("dataBase", () => {
187190
getSurfacesUuids,
188191
getBlocksUuids,
189192
getFlatIndexes,
190-
exportStores, // maintenant défini
193+
exportStores, // maintenant défini
191194
importStores,
192195
}
193196
})

stores/data_style.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
4040
}
4141

4242
function setModelEdgesVisibility(id, visibility) {
43-
modelStyleStore.setModelMeshComponentVisibility(id, "Edge", null, visibility)
43+
modelStyleStore.setModelMeshComponentVisibility(
44+
id,
45+
"Edge",
46+
null,
47+
visibility,
48+
)
4449
}
4550

4651
function modelEdgesVisibility(id) {
@@ -53,7 +58,8 @@ export const useDataStyleStore = defineStore("dataStyle", () => {
5358

5459
async function importStores(snapshot) {
5560
const stylesSnapshot = snapshot?.styles || {}
56-
for (const id of Object.keys(dataStyleState.styles)) delete dataStyleState.styles[id]
61+
for (const id of Object.keys(dataStyleState.styles))
62+
delete dataStyleState.styles[id]
5763
for (const [id, style] of Object.entries(stylesSnapshot)) {
5864
dataStyleState.styles[id] = style
5965
}

0 commit comments

Comments
 (0)