From 72dc6117648fb0dfc61d04427c1cbde4f56a202e Mon Sep 17 00:00:00 2001 From: portree_kid Date: Tue, 30 Jun 2020 21:45:00 +0200 Subject: [PATCH] Parking group selection --- src/renderer/components/AirportEdit.vue | 13 ++++--------- src/renderer/components/FlightgearMap.vue | 6 ++++-- src/renderer/components/LeafletSidebar.vue | 3 ++- src/renderer/components/ParkingGroupEdit.vue | 3 ++- src/renderer/store/modules/Editable.js | 3 +++ 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/renderer/components/AirportEdit.vue b/src/renderer/components/AirportEdit.vue index 1ce8a8d..ecb8ad7 100644 --- a/src/renderer/components/AirportEdit.vue +++ b/src/renderer/components/AirportEdit.vue @@ -45,12 +45,15 @@ export default { data () { - return {activeTab: 'first', editLayer: null} + return {activeTab: 'first', editing: Boolean} }, components: { Frequency, ParkingList }, methods: { + setEditing (editing) { + this.editing = editing + }, addFrequency () { this.$store.dispatch('addFrequency', {type: 'AWOS', value: 0}) }, @@ -66,14 +69,6 @@ export default { } }, computed: { - editing: { - get: function () { - if (this.editLayer === null) { - this.initLayer() - } - return this.editLayer !== null && this.editLayer.editing - } - }, icao: function () { return this.$store.state.Airports.currentAirport.icao }, diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index 2ca63d2..ff23973 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -118,8 +118,10 @@ You should have received a copy of the GNU General Public License along with FG methods: { onSelectedPolygon (ring) { var parkings = this.$refs.editLayer.getParkings(ring) - console.log(ring) - console.log(parkings) + console.debug(ring) + console.debug(parkings) + + this.$store.commit('SET_EDIT_TYPE', 'parking-group') this.$refs.sidebar.setData(parkings) }, onEdit (event) { diff --git a/src/renderer/components/LeafletSidebar.vue b/src/renderer/components/LeafletSidebar.vue index 440c294..0375876 100644 --- a/src/renderer/components/LeafletSidebar.vue +++ b/src/renderer/components/LeafletSidebar.vue @@ -40,7 +40,7 @@ You should have received a copy of the GNU General Public License along with FG - +