Pushback Route create

This commit is contained in:
portree_kid 2020-04-18 22:35:24 +02:00
parent 4b908f57ce
commit 98c29b8b62
6 changed files with 55 additions and 9 deletions

View File

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

View File

@ -31,7 +31,4 @@
</script>
<style scoped lang="scss">
.ai-layer {
}
</style>

View File

@ -30,6 +30,12 @@
:show="editing"
tooltip="Draw Taxiline"
></EditButton>
<EditButton
icon="fas fa-arrows-alt-h"
v-on:click="drawPushbackPolyline"
:show="editing"
tooltip="Draw Taxiline"
></EditButton>
<EditButton
icon="fas fa-parking"
v-on:click="drawParking"
@ -176,6 +182,9 @@
drawPolyline () {
this.$parent.$parent.$refs.editLayer.drawPolyline()
},
drawPushbackPolyline () {
this.$parent.$parent.$refs.editLayer.drawPushbackPolyline()
},
drawParking () {
this.$parent.$parent.$refs.editLayer.drawParking()
},

View File

@ -389,6 +389,41 @@
event.target.addTo(this.groundnetLayerGroup)
})
},
drawPushbackPolyline () {
var polyLine = this.$parent.mapObject.editTools.startPolyline()
polyLine.addTo(this.groundnetLayerGroup)
polyLine.groundnetLayerGroup = this.groundnetLayerGroup;
polyLine.attributes = [];
polyLine.options.attributes = {isPushBackRoute: 1, direction: 'bi-directional' };
polyLine.featureLookup = this.featureLookup;
extendTaxiSegment(polyLine);
polyLine.setEditlayer(this);
polyLine.updateStyle();
//polyLine.extensions(this);
polyLine.addListeners()
polyLine.on('editable:drawing:end', event => {
console.log(event)
event.target.addTo(this.groundnetLayerGroup)
var pt = event.sourceTarget._latlngs[event.sourceTarget._latlngs.length-1];
pt.attributes.holdPointType = 'PushBack'
var nIndex = pt.attributes.index
var fa_icon = "<div style='background-color:#4838cc;' class='marker-pin'></div><i class='fas fa-arrows-alt-h'></i>";
const icon = new L.DivIcon({
className: 'custom-div-icon',
html: fa_icon,
iconSize: [30, 42],
iconAnchor: [15, 42]
});
const node = new L.HoldNode(pt, { icon: icon });
node.glueindex = nIndex;
node.addTo(this.groundnetLayerGroup);
node.featureLookup = this.featureLookup;
this.featureLookup[nIndex].push(node);
node.addListeners();
node.extensions();
})
},
editedParking() {
console.log('Edited Parking : ' + this.$store.state.Editable.data.parking)
if (this.$store.state.Editable.index === undefined ||

View File

@ -182,9 +182,12 @@
this.scanning = false
console.log('DONE')
store.dispatch('getAirports')
worker.view.max = 0
worker.view.scanning = false
worker.terminate()
if (worker.view.max !== undefined) {
worker.view.max = 0
}
if (worker.view.scanning !== undefined) {
worker.view.scanning = false
}
clearInterval(this.polling)
} else if (e.data.length > 0) {
if (e.data[0] === 'max') {

View File

@ -40,7 +40,7 @@
},
computed: {
wip: function () {
return this.$store.state.Settings.wip
return this.$store.state.Settings.wip.sort((p, p2) => { return p.date > p2.date })
}
}
}
@ -50,4 +50,6 @@
.text {
padding: 10px;
}
</style>
.el-row {
margin-bottom: 0px;
}</style>