Node edit
This commit is contained in:
parent
32c0cbd33b
commit
d9eed59de7
@ -694,8 +694,9 @@
|
||||
if(element.__vertex && Number(element.glueindex) === Number(nIndex)){
|
||||
if (this.$store.state.Editable.data.node.coords) {
|
||||
console.log('Cords : ' + this.$store.state.Editable.data.node.coords);
|
||||
|
||||
this.setPointCoords(this.$store.state.Editable.index, this.$store.state.Editable.data.node.coords)
|
||||
var position = new Coordinates(this.$store.state.Editable.data.node.coords);
|
||||
latlng = {lat: position.latitude, lng: position.longitude };
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -6,7 +6,9 @@
|
||||
<span class="label">Coordinates :</span>
|
||||
</el-col>
|
||||
<el-col :span="17">
|
||||
<el-input placeholder="Please input" v-model="coordinates" :disabled="!editing"></el-input>
|
||||
<el-input placeholder="Please input" v-model="coordinates" :disabled="!editing"
|
||||
@focus="coordFocussed = true"
|
||||
@blur="coordFocussed = false"></el-input>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -14,7 +16,8 @@
|
||||
<span class="label">Is on runway :</span>
|
||||
</el-col>
|
||||
<el-col :span="15">
|
||||
<el-switch v-model="isOnRunway" :disabled="!editing"></el-switch>
|
||||
<el-switch v-model="isOnRunway" :disabled="!editing" @focus="runwayFocussed = true"
|
||||
@blur="runwayFocussed = false"></el-switch>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
@ -28,6 +31,7 @@
|
||||
:key="type.value"
|
||||
:label="type.label"
|
||||
:value="type.value"
|
||||
:disabled="type.disabled"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
@ -47,6 +51,11 @@
|
||||
}
|
||||
},
|
||||
*/
|
||||
data () {
|
||||
return {
|
||||
coordFocussed: false, runwayFocussed: false, holdFocussed: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
editing: {
|
||||
get: function () {
|
||||
@ -54,7 +63,7 @@
|
||||
}
|
||||
},
|
||||
options: function () {
|
||||
return [{value: 'none', label: 'none'}, {value: 'PushBack', label: 'PushBack'}, {value: 'normal', label: 'normal'}, {value: 'CAT II/III', label: 'CAT II/III'}]
|
||||
return [{value: 'none', label: 'none', disabled: false }, {value: 'PushBack', label: 'PushBack'}, {value: 'normal', label: 'normal'}, {value: 'CAT II/III', label: 'CAT II/III'}]
|
||||
},
|
||||
node: function () {
|
||||
return this.$store.state.Editable.type === 'node' || this.$store.state.Editable.type === 'runway'
|
||||
@ -69,11 +78,10 @@
|
||||
},
|
||||
// setter
|
||||
set: function (newValue) {
|
||||
if (newValue==='unknown') {
|
||||
|
||||
}
|
||||
if (this.coordFocussed) {
|
||||
this.$store.commit('SET_EDIT_NODE_COORDS', newValue)
|
||||
}
|
||||
}
|
||||
},
|
||||
isOnRunway: {
|
||||
// getter
|
||||
@ -82,8 +90,10 @@
|
||||
},
|
||||
// setter
|
||||
set: function (newValue) {
|
||||
if(!this.runwayFocussed) {
|
||||
this.$store.commit('SET_EDIT_ISONRUNWAY', newValue ? 1 : 0)
|
||||
}
|
||||
}
|
||||
},
|
||||
holdPointType: {
|
||||
// getter
|
||||
|
@ -21,7 +21,7 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
||||
|
||||
taxiwaySegment.__proto__.updateMiddle = function () {
|
||||
this._latlngs.forEach(element => {
|
||||
if (element.__vertex.middleMarker) {
|
||||
if (element.__vertex && element.__vertex.middleMarker) {
|
||||
element.__vertex.middleMarker.updateLatLng();
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user