Glued Runway Nodes

This commit is contained in:
portree_kid
2020-01-26 22:28:48 +01:00
parent 756791206a
commit cbb78d7f3d
7 changed files with 156 additions and 43 deletions
+9 -1
View File
@@ -1,7 +1,7 @@
const state = {
type: 'none',
index: 'none',
data: {airports: {}, parking: {}, arc: {}}
data: {airports: {}, parking: {}, arc: {}, nodes: {}}
}
const SET_EDIT_AIRPORT = 'SET_EDIT_AIRPORT'
@@ -19,6 +19,11 @@ const mutations = {
state.index = parking.index
state.type = 'parking'
},
'SET_EDIT_NODE' (state, node) {
state.data.nodes[node.index] = node
state.index = node.index
state.type = 'node'
},
SET_EDIT_ARC (state, arc) {
state.data.arc = arc
state.type = 'arc'
@@ -37,6 +42,9 @@ const actions = {
},
async setArc (context, arc) {
context.commit(SET_EDIT_ARC, arc)
},
async setNode (context, node) {
context.commit('SET_EDIT_NODE', node)
}
}