Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronClaydon committed Jun 24, 2024
1 parent efcb589 commit df2b6f6
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions src/views/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ export default {
this.refreshData()
},
zoomUpdate(zoom) {
this.currentZoom = zoom;
this.currentZoom = zoom
localStorage.map_last_zoom = this.currentZoom
},
refreshData(updateStops = true, updateVehicles = true) {
if (this.$refs.map !== undefined) {
Expand All @@ -181,6 +183,8 @@ export default {
mapPositionUpdate(center) {
this.currentCenter = center
localStorage.map_last_center = JSON.stringify(this.currentCenter)
this.getData(true, true)
},
getData(updateStops, updateVehicles) {
Expand Down Expand Up @@ -307,16 +311,7 @@ export default {
localStorage.map_showVehicles = to
}
},
$route: {
immediate: true,
handler(to, from) {
if (this.$refs.map !== undefined) {
localStorage.map_last_center = JSON.stringify(this.currentCenter)
localStorage.map_last_zoom = this.currentZoom
}
}
},
}
}
}
</script>

0 comments on commit df2b6f6

Please sign in to comment.