Frontend: Don't fit bounds when search is cleared
Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
parent
96d87ac6f7
commit
fc3a83e5cd
@ -39,6 +39,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
initialized: false,
|
||||
map: null,
|
||||
markers: {},
|
||||
markersOnScreen: {},
|
||||
@ -122,12 +123,16 @@
|
||||
|
||||
this.map.getSource("photos").setData(this.result);
|
||||
|
||||
this.map.fitBounds(this.result.bbox, {maxZoom: 19});
|
||||
if(this.filter.q || !this.initialized) {
|
||||
this.map.fitBounds(this.result.bbox, {maxZoom: 19});
|
||||
}
|
||||
|
||||
this.updateMarkers();
|
||||
} else {
|
||||
this.$notify.warning("No photos found");
|
||||
}
|
||||
|
||||
this.initialized = true;
|
||||
}).catch(() => this.loading = false);
|
||||
},
|
||||
renderMap() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user