Parking group selection

pull/36/head
portree_kid 4 years ago
parent 57b83daa51
commit 72dc611764

@ -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
},

@ -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) {

@ -40,7 +40,7 @@ You should have received a copy of the GNU General Public License along with FG
<ArcEdit></ArcEdit>
<NodeEdit></NodeEdit>
<ParkingGroupEdit ref="parkingGroupEdit" @edit="(msg) => $emit('edit', msg)"></ParkingGroupEdit>
<AirportEdit></AirportEdit>
<AirportEdit ref="airportEdit"></AirportEdit>
</div>
<!--
<div class="leaflet-sidebar-pane" id="parking">
@ -137,6 +137,7 @@ You should have received a copy of the GNU General Public License along with FG
},
setEditing (editing) {
this.$refs.parkingGroupEdit.setEditing(editing)
this.$refs.airportEdit.setEditing(editing)
},
setData (data) {
if (data.length > 0) {

@ -175,7 +175,8 @@ const convert = require('geo-coordinates-parser');
},
computed: {
parking: function () {
return this.data !== null
return this.data !== null && this.$store.state.Editable.type === 'parking-group'
},
airlines: function () {
var airlineCodes = [];

@ -13,6 +13,9 @@ const SET_EDIT_ARC = 'SET_EDIT_ARC'
const SET_EDIT_RUNWAY = 'SET_EDIT_RUNWAY'
const mutations = {
SET_EDIT_TYPE (state, type) {
state.type = type
},
SET_EDIT (state, editing) {
state.editing = editing
},

Loading…
Cancel
Save