Reopen map options after reload due to changing map type

pull/10/head
Manuel Kasper 2021-03-06 20:58:41 +01:00
rodzic dc63bd4ee1
commit f84c076d86
2 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -71,6 +71,12 @@ export default {
open: false open: false
} }
}, },
mounted () {
if (sessionStorage.getItem('mapReloaded')) {
sessionStorage.removeItem('mapReloaded')
this.open = true
}
},
computed: { computed: {
recentSpots () { recentSpots () {
let now = moment.utc() let now = moment.utc()

Wyświetl plik

@ -140,6 +140,7 @@ const store = new Vuex.Store({
localStorage.setItem('mapType', newMapType) localStorage.setItem('mapType', newMapType)
// Force a reload now to avoid problems with layers added by draw etc. // Force a reload now to avoid problems with layers added by draw etc.
sessionStorage.setItem('mapReloaded', true)
window.location.reload() window.location.reload()
}, },
setMapOption (state, mutation) { setMapOption (state, mutation) {