Skip to content

Commit

Permalink
Keep zoom level while searching
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Sep 28, 2023
1 parent 5d12143 commit 29b0fde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/components/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,17 @@
},
changeView: function() {
this.leafletMap.setView(this.center, this.zoom)
},
changeCenter: function() {
this.leafletMap.panTo(this.center)
}
},
watch: {
map() {
this.changeMap()
},
center() {
this.changeView()
this.changeCenter()
}
},
mounted() {
Expand Down

0 comments on commit 29b0fde

Please sign in to comment.