diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index bbde3b7..6adb712 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -47,8 +47,6 @@ }, data () { return { - zoom: this.$store.state.Settings.zoom, - center: this.$store.state.Settings.center, url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png', attribution: '© OpenStreetMap contributors', marker: L.latLng(47.413220, -1.219482), @@ -61,19 +59,22 @@ this.$store.commit('SET_EDIT_AIRPORT', item) }, zoomUpdated (zoom) { - this.zoom = zoom - this.$store.commit('ZOOM', this.zoom) + this.$store.commit('ZOOM', zoom) }, centerUpdated (center) { - this.center = center - this.$store.commit('CENTER', this.center) + this.$store.commit('CENTER', center) }, boundsUpdated (bounds) { this.bounds = bounds } }, computed: { - + zoom: function () { + return this.$store.state.Settings.zoom + }, + center: function () { + return this.$store.state.Settings.center + } } }