Edit node coordinates bidirectional

This commit is contained in:
portree_kid
2020-06-01 13:37:12 +02:00
parent 23cc742c93
commit 66687bb35f
4 changed files with 41 additions and 34 deletions
+5 -1
View File
@@ -82,6 +82,9 @@ const mutations = {
'SET_EDIT_HOLDPOINTTYPE' (state, holdPointType) {
Vue.set(state.data.node, 'holdPointType', holdPointType)
},
'SET_EDIT_COORDS' (state, coords) {
Vue.set(state.data.node, 'coords', coords)
},
'SET_EDIT_ISONRUNWAY' (state, isOnRunway) {
Vue.set(state.data.node, 'isOnRunway', isOnRunway)
}
@@ -101,7 +104,8 @@ const actions = {
context.commit(SET_EDIT_ARC, arc)
},
async setNode (context, node) {
context.commit('SET_EDIT_NODE', node)
context.commit('SET_EDIT_NODE', node.attributes)
context.commit('SET_EDIT_COORDS', node.lat.toFixed(5) + ' ' + node.lng.toFixed(5))
}
}