Fewer MUTATIONS of CENTER & BOUNDS
This commit is contained in:
parent
d520d982b5
commit
7f3bdc8de8
@ -101,14 +101,20 @@
|
|||||||
this.$store.commit('SET_EDIT_AIRPORT', item.properties)
|
this.$store.commit('SET_EDIT_AIRPORT', item.properties)
|
||||||
},
|
},
|
||||||
zoomUpdated (zoom) {
|
zoomUpdated (zoom) {
|
||||||
this.$store.dispatch('setZoom', zoom)
|
if (zoom !== this.$store.state.Settings.zoom) {
|
||||||
console.log(this.$refs.airportLayer.setVisible(zoom < 12))
|
this.$store.dispatch('setZoom', zoom)
|
||||||
|
this.$refs.airportLayer.setVisible(zoom < 12)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
centerUpdated (center) {
|
centerUpdated (center) {
|
||||||
this.$store.dispatch('setCenter', center)
|
if (center !== this.$store.state.Settings.center) {
|
||||||
|
this.$store.dispatch('setCenter', center)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
boundsUpdated (bounds) {
|
boundsUpdated (bounds) {
|
||||||
this.$store.dispatch('setBounds', bounds)
|
if (bounds !== this.$store.state.Settings.bounds) {
|
||||||
|
this.$store.dispatch('setBounds', bounds)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
Loading…
Reference in New Issue
Block a user