kopia lustrzana https://github.com/manuelkasper/sotlas-frontend
Reopen map options after reload due to changing map type
rodzic
dc63bd4ee1
commit
f84c076d86
|
@ -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()
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Ładowanie…
Reference in New Issue