Consistant editing

This commit is contained in:
portree_kid 2020-05-22 14:43:28 +02:00
parent eb69b0cdb2
commit 7f9c5b5457
6 changed files with 85 additions and 41 deletions

View File

@ -25,11 +25,12 @@ script:
deploy: deploy:
skip_cleanup: true skip_cleanup: true
overwrite: true overwrite: true
name: '0.0.11'
provider: releases provider: releases
api_key: api_key:
secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE= secure: Xm3z86gQmpSajvlXSVgG7mxcaS5K7GfE4HrARIDR4pQ4UguQ3/fFOenRyKAQImmH0kLCSIbVE21NMAQ3YI2F9El9I6GU7Wirccsg14TZZiBQAzKOTXZ+JsBloeBxuTOsR84SkO6pV8OT/pRnQd9frqyc1W7wzoX+0sQykMztXCNfI+1MXXGOAgMzlKuDMO1PVENz0V63mWipL/Mae/SyrHa1Bws+4LJKvv42m0HMKdN7ekt41vxcSUvLmN+YLlqUEVr/eUhQXUNCaWlmM0KxmfuzTedca5/1yzLvN8smEt2I2b0DFRM3Mi/QdI22fVRHs6XGpm8yqZRKmhySDXFspXKWBiuCF6AezX6NiIe/ZUh10gIukjkyLtrNk/o29qhj2WE9HJz4xhsGMAx3632cLSMPku5ALN7jv5scWjwCGNHs4ZeZyyePMeGM6Y6pje1uJPbxWGjwoV6iI4Y4esP+z3KcXvZdnzkpYMy2mzdT4gf7A7zieax1YwB6U/MEanXYKFBH4yzYK9+hx3ck2eLT3LcV/ChHN2bKmERJdf18h+zI8e5YKTzd3/kHLiUUv19N2a4TUYloGOyzrLwn2VD1Xm4jJVVLTIQvWbH5YK7cNkHYa4+PnsB+JppSoby7HiBcothw4OLpJO8eCMqXcPRU1n+cRAZTB7VOS7pWh8e8LFE=
file_glob: true file_glob: true
file: build/* file: build/*
on: on:
branches: '0.0.10' branches: '0.0.11'
repo: Portree-Kid/flightgear-airports repo: Portree-Kid/flightgear-airports

View File

@ -1,6 +1,6 @@
{ {
"name": "flightgear-airports", "name": "flightgear-airports",
"version": "0.0.10", "version": "0.0.11",
"author": "portree_kid <keith.paterson@gmx.de>", "author": "portree_kid <keith.paterson@gmx.de>",
"description": "An software to design Flightgear groundnets", "description": "An software to design Flightgear groundnets",
"license": "GPL v3", "license": "GPL v3",

View File

@ -548,7 +548,8 @@
editedNode() { editedNode() {
if (this.$store.state.Editable.index === undefined || if (this.$store.state.Editable.index === undefined ||
this.$store.state.Editable.data.node === undefined || this.$store.state.Editable.data.node === undefined ||
this.featureLookup===undefined) { this.featureLookup===undefined ||
!this.editing) {
return; return;
} }
var isOnRunway = Number(this.$store.state.Editable.data.node.isOnRunway); var isOnRunway = Number(this.$store.state.Editable.data.node.isOnRunway);
@ -603,7 +604,7 @@
} }
} else if (element instanceof L.Polyline) { } else if (element instanceof L.Polyline) {
element._latlngs.forEach(element => { element._latlngs.forEach(element => {
if(Number(element.__vertex.glueindex) === Number(nIndex)){ if(!element.__vertex && Number(element.__vertex.glueindex) === Number(nIndex)){
latlng = element.__vertex.latlng; latlng = element.__vertex.latlng;
} }
}); });

View File

@ -3,18 +3,26 @@
<div> <div>
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<span class="demo-input-label">Is on runway :</span> <span class="label">Coordinates :</span>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="17">
<el-switch v-model="isOnRunway"></el-switch> <el-input placeholder="Please input" v-model="coordinates" :disabled="!editing"></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<span class="demo-input-label">Holdpoint Type :</span> <span class="label">Is on runway :</span>
</el-col> </el-col>
<el-col :span="15"> <el-col :span="15">
<el-select v-model="holdPointType" placeholder="Select"> <el-switch v-model="isOnRunway" :disabled="!editing"></el-switch>
</el-col>
</el-row>
<el-row>
<el-col :span="9">
<span class="label">Holdpoint Type :</span>
</el-col>
<el-col :span="15">
<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"
@ -29,6 +37,8 @@
</template> </template>
<script lang="js"> <script lang="js">
/* eslint-disable */
const Coordinates = require('coordinate-parser');
export default { export default {
/* /*
methods: { methods: {
@ -38,13 +48,40 @@
}, },
*/ */
computed: { computed: {
editing: {
get: function () {
return this.$parent.$parent.$parent.$refs.editLayer.editing
}
},
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'}, {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' return this.$store.state.Editable.type === 'node' || this.$store.state.Editable.type === 'runway'
}, },
// {index: 39, lat: "N58 27.343", lon: "W03 5.153", isOnRunway: 0, holdPointType: "none"} // {index: 39, lat: "N58 27.343", lon: "W03 5.153", isOnRunway: 0, holdPointType: "none"}
coordinates: {
// getter
get: function () {
if(this.$store.state.Editable.index!==undefined) {
var ret = this.$parent.$parent.$parent.$refs.editLayer.getPointCoords(this.$store.state.Editable.index)
if(ret) {
return ret[0].lat + " " + ret[0].lng
} else {
return 'unknown'
}
}
},
// setter
set: function (newValue) {
if (newValue==='unknown') {
}
var position = new Coordinates(newValue);
console.log(position);
this.$parent.$parent.$parent.$refs.editLayer.setPointCoords(this.$store.state.Editable.index, position)
}
},
isOnRunway: { isOnRunway: {
// getter // getter
get: function () { get: function () {

View File

@ -16,13 +16,13 @@
<span class="label">Name :</span> <span class="label">Name :</span>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-input placeholder="Name" v-model="name"></el-input> <el-input placeholder="Name" v-model="name" :disabled="!editing"></el-input>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<span class="label">Number :</span> <span class="label">Number :</span>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-input placeholder="Number" v-model="number"></el-input> <el-input placeholder="Number" v-model="number" :disabled="!editing"></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -39,7 +39,7 @@
* F A380 40 24 * F A380 40 24
--> -->
<el-radio-group v-model="wingspan"> <el-radio-group v-model="wingspan" :disabled="!editing">
<el-tooltip content="PIPER PA-31/CESSNA 404 Titan" placement="top" effect="light"> <el-tooltip content="PIPER PA-31/CESSNA 404 Titan" placement="top" effect="light">
<el-radio :label="15">A</el-radio> <el-radio :label="15">A</el-radio>
</el-tooltip> </el-tooltip>
@ -80,7 +80,7 @@
<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"></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-row>
@ -88,7 +88,7 @@
<span class="label">Parking Type :</span> <span class="label">Parking Type :</span>
</el-col> </el-col>
<el-col :span="17"> <el-col :span="17">
<el-select v-model="parking_type" placeholder="Select"> <el-select v-model="parking_type" placeholder="Select" :disabled="!editing">
<el-option <el-option
v-for="type in options" v-for="type in options"
:key="type.value" :key="type.value"
@ -103,7 +103,7 @@
<span class="label">Airline :</span> <span class="label">Airline :</span>
</el-col> </el-col>
<el-col :span="17"> <el-col :span="17">
<el-select v-model="airlineCodes" multiple placeholder="Select"> <el-select v-model="airlineCodes" multiple placeholder="Select" :disabled="!editing">
<el-option <el-option
v-for="item in airlines" v-for="item in airlines"
:key="item.value" :key="item.value"
@ -134,6 +134,11 @@
} }
}, },
computed: { computed: {
editing: {
get: function () {
return this.$parent.$parent.$parent.$refs.editLayer.editing
}
},
parking: function () { parking: function () {
return this.$store.state.Editable.type === 'parking' return this.$store.state.Editable.type === 'parking'
}, },

View File

@ -36,7 +36,7 @@ const mutations = {
}, },
SET_EDIT_RUNWAY (state, runway) { SET_EDIT_RUNWAY (state, runway) {
Vue.set(state, 'data', {}) Vue.set(state, 'data', {})
Vue.set(state.data, 'runway', runway) Vue.set(state.data, 'node', runway)
Vue.set(state, 'index', runway.index) Vue.set(state, 'index', runway.index)
Vue.set(state, 'type', 'runway') Vue.set(state, 'type', 'runway')
}, },