Selection Editable Objects

This commit is contained in:
portree_kid
2020-01-05 20:22:45 +01:00
parent 0a0e2574e5
commit cd501175f5
6 changed files with 36 additions and 36 deletions
+7 -4
View File
@@ -1,6 +1,7 @@
const state = {
type: 'none',
data: Object
index: 'none',
data: {airports: {}, parking: {}, arc: {}}
}
const SET_EDIT_AIRPORT = 'SET_EDIT_AIRPORT'
@@ -9,15 +10,17 @@ const SET_EDIT_ARC = 'SET_EDIT_ARC'
const mutations = {
SET_EDIT_AIRPORT (state, airport) {
state.data = airport
state.data.airports[airport.icao] = airport
state.index = airport.icao
state.type = 'airport'
},
SET_EDIT_PARKING (state, parking) {
state.data = parking
state.data.parking[parking.index] = parking
state.index = parking.index
state.type = 'parking'
},
SET_EDIT_ARC (state, arc) {
state.data = arc
state.data.arc = arc
state.type = 'arc'
},
'SET_EDIT_PARKING_NAME' (state, parkingName) {