Heading Edit
This commit is contained in:
parent
1f395e2157
commit
7142373c2a
@ -83,6 +83,14 @@
|
|||||||
<el-input placeholder="Please input" v-model="coordinates" :disabled="!editing"></el-input>
|
<el-input placeholder="Please input" v-model="coordinates" :disabled="!editing"></el-input>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="7">
|
||||||
|
<span class="label">Heading :</span>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="17">
|
||||||
|
<el-input-number v-model="heading" :min="-1" :max="361" step=0.1 :disabled="!editing"></el-input-number>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<span class="label">Parking Type :</span>
|
<span class="label">Parking Type :</span>
|
||||||
@ -207,6 +215,22 @@
|
|||||||
this.$parent.$parent.$parent.$refs.editLayer.setPointCoords(this.$store.state.Editable.index, position)
|
this.$parent.$parent.$parent.$refs.editLayer.setPointCoords(this.$store.state.Editable.index, position)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
heading: {
|
||||||
|
// getter
|
||||||
|
get: function () {
|
||||||
|
return Number(this.$store.state.Editable.data.parking.heading)
|
||||||
|
},
|
||||||
|
// setter
|
||||||
|
set: function (newValue) {
|
||||||
|
if (newValue>=360) {
|
||||||
|
newValue -= 360
|
||||||
|
}
|
||||||
|
if (newValue<0) {
|
||||||
|
newValue += 360
|
||||||
|
}
|
||||||
|
this.$store.commit('SET_EDIT_PARKING_HEADING', newValue)
|
||||||
|
}
|
||||||
|
},
|
||||||
wingspan: {
|
wingspan: {
|
||||||
// getter
|
// getter
|
||||||
get: function () {
|
get: function () {
|
||||||
|
@ -55,6 +55,9 @@ const mutations = {
|
|||||||
'SET_EDIT_PARKING_NUMBER' (state, parkingName) {
|
'SET_EDIT_PARKING_NUMBER' (state, parkingName) {
|
||||||
Vue.set(state.data.parking, 'number', parkingName)
|
Vue.set(state.data.parking, 'number', parkingName)
|
||||||
},
|
},
|
||||||
|
'SET_EDIT_PARKING_HEADING' (state, heading) {
|
||||||
|
Vue.set(state.data.parking, 'heading', heading)
|
||||||
|
},
|
||||||
'SET_EDIT_PARKING_AIRLINES' (state, airlineCodes) {
|
'SET_EDIT_PARKING_AIRLINES' (state, airlineCodes) {
|
||||||
Vue.set(state.data.parking, 'airlineCodes', airlineCodes)
|
Vue.set(state.data.parking, 'airlineCodes', airlineCodes)
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user