Node edit
This commit is contained in:
parent
32c0cbd33b
commit
d9eed59de7
@ -694,8 +694,9 @@
|
|||||||
if(element.__vertex && Number(element.glueindex) === Number(nIndex)){
|
if(element.__vertex && Number(element.glueindex) === Number(nIndex)){
|
||||||
if (this.$store.state.Editable.data.node.coords) {
|
if (this.$store.state.Editable.data.node.coords) {
|
||||||
console.log('Cords : ' + 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)
|
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>
|
<span class="label">Coordinates :</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="17">
|
<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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -14,7 +16,8 @@
|
|||||||
<span class="label">Is on runway :</span>
|
<span class="label">Is on runway :</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
@ -22,12 +25,13 @@
|
|||||||
<span class="label">Holdpoint Type :</span>
|
<span class="label">Holdpoint Type :</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="15">
|
<el-col :span="15">
|
||||||
<el-select v-model="holdPointType" placeholder="Select" :disabled="!editing">
|
<el-select v-model="holdPointType" placeholder="Select" :disabled="!editing" >
|
||||||
<el-option
|
<el-option
|
||||||
v-for="type in options"
|
v-for="type in options"
|
||||||
:key="type.value"
|
:key="type.value"
|
||||||
:label="type.label"
|
:label="type.label"
|
||||||
:value="type.value"
|
:value="type.value"
|
||||||
|
:disabled="type.disabled"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -47,6 +51,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
coordFocussed: false, runwayFocussed: false, holdFocussed: false
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
editing: {
|
editing: {
|
||||||
get: function () {
|
get: function () {
|
||||||
@ -54,7 +63,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
options: function () {
|
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 () {
|
node: function () {
|
||||||
return this.$store.state.Editable.type === 'node' || this.$store.state.Editable.type === 'runway'
|
return this.$store.state.Editable.type === 'node' || this.$store.state.Editable.type === 'runway'
|
||||||
@ -69,10 +78,9 @@
|
|||||||
},
|
},
|
||||||
// setter
|
// setter
|
||||||
set: function (newValue) {
|
set: function (newValue) {
|
||||||
if (newValue==='unknown') {
|
if (this.coordFocussed) {
|
||||||
|
this.$store.commit('SET_EDIT_NODE_COORDS', newValue)
|
||||||
}
|
}
|
||||||
this.$store.commit('SET_EDIT_NODE_COORDS', newValue)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isOnRunway: {
|
isOnRunway: {
|
||||||
@ -82,7 +90,9 @@
|
|||||||
},
|
},
|
||||||
// setter
|
// setter
|
||||||
set: function (newValue) {
|
set: function (newValue) {
|
||||||
this.$store.commit('SET_EDIT_ISONRUNWAY', newValue ? 1 : 0)
|
if(!this.runwayFocussed) {
|
||||||
|
this.$store.commit('SET_EDIT_ISONRUNWAY', newValue ? 1 : 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
holdPointType: {
|
holdPointType: {
|
||||||
|
@ -21,7 +21,7 @@ exports.extendTaxiSegment = function (taxiwaySegment) {
|
|||||||
|
|
||||||
taxiwaySegment.__proto__.updateMiddle = function () {
|
taxiwaySegment.__proto__.updateMiddle = function () {
|
||||||
this._latlngs.forEach(element => {
|
this._latlngs.forEach(element => {
|
||||||
if (element.__vertex.middleMarker) {
|
if (element.__vertex && element.__vertex.middleMarker) {
|
||||||
element.__vertex.middleMarker.updateLatLng();
|
element.__vertex.middleMarker.updateLatLng();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user