Fix Route Edit #40
This commit is contained in:
parent
af03c5fe12
commit
4c0f09e8d9
@ -695,15 +695,15 @@ You should have received a copy of the GNU General Public License along with FG
|
|||||||
!this.editing) {
|
!this.editing) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.debug("Edit Type : " + this.$store.state.Editable.data.multiarc.ids);
|
console.debug("Edit Type : " + this.$store.state.Editable.data.multiarc.ids + ' ' + String(this.$store.state.Editable.data.multiarc.direction));
|
||||||
this.$store.state.Editable.data.multiarc.ids.forEach(id => {
|
this.$store.state.Editable.data.multiarc.ids.forEach(id => {
|
||||||
console.debug(id);
|
console.debug(id);
|
||||||
var arc = this.groundnetLayerGroup.getLayer(id);
|
var arc = this.groundnetLayerGroup.getLayer(id);
|
||||||
if (arc && arc instanceof L.Polyline) {
|
if (arc && arc instanceof L.Polyline) {
|
||||||
console.log('Edited Arc : ' + this.$store.state.Editable.index);
|
console.log('Edited Arc : ' + this.$store.state.Editable.index);
|
||||||
arc.options.attributes.direction = this.$store.state.Editable.data.multiarc.direction
|
arc.options.attributes.direction = String(this.$store.state.Editable.data.multiarc.direction)
|
||||||
arc.options.attributes.name = this.$store.state.Editable.data.multiarc.name
|
arc.options.attributes.name = String(this.$store.state.Editable.data.multiarc.name)
|
||||||
arc.options.attributes.isPushBackRoute = this.$store.state.Editable.data.multiarc.isPushBackRoute
|
arc.options.attributes.isPushBackRoute = Number(this.$store.state.Editable.data.multiarc.isPushBackRoute)
|
||||||
arc.updateStyle();
|
arc.updateStyle();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -201,7 +201,10 @@ var mapParkings = function (o) {
|
|||||||
var lat = convertLat(o.getLatLng());
|
var lat = convertLat(o.getLatLng());
|
||||||
var lon = convertLon(o.getLatLng());
|
var lon = convertLon(o.getLatLng());
|
||||||
// <Parking index="0" type="gate" name="GA_Parking" lat="S9 25.739923" lon="E160 2.927602" heading="67" radius="44" airlineCodes="" />
|
// <Parking index="0" type="gate" name="GA_Parking" lat="S9 25.739923" lon="E160 2.927602" heading="67" radius="44" airlineCodes="" />
|
||||||
var parking = { '@index': String(o['id']), '@type': o.options.attributes.type, '@name': o.options.attributes.name, '@lat': lat, '@lon': lon, '@heading': Number(o.options.attributes.heading%360).toFixed(1), '@radius': String(o.options.attributes.radius) };
|
var parking = { '@index': String(o['id']), '@type': o.options.attributes.type, '@lat': lat, '@lon': lon, '@heading': Number(o.options.attributes.heading%360).toFixed(1), '@radius': String(o.options.attributes.radius) };
|
||||||
|
if (o.options.attributes.name !== '' && o.options.attributes.name !== 'undefined' && o.options.attributes.name !== undefined) {
|
||||||
|
parking['@name'] = o.options.attributes.name;
|
||||||
|
}
|
||||||
if( o.options.attributes.airlineCodes) {
|
if( o.options.attributes.airlineCodes) {
|
||||||
console.debug(o.options.attributes.airlineCodes);
|
console.debug(o.options.attributes.airlineCodes);
|
||||||
parking['@airlineCodes'] = o.options.attributes.airlineCodes;
|
parking['@airlineCodes'] = o.options.attributes.airlineCodes;
|
||||||
@ -247,7 +250,7 @@ var mapHoldPoint = function (o) {
|
|||||||
|
|
||||||
var mapBeginNode = function (o) {
|
var mapBeginNode = function (o) {
|
||||||
if (o instanceof L.TaxiwaySegment) {
|
if (o instanceof L.TaxiwaySegment) {
|
||||||
console.debug(o);
|
console.debug('Map Begin : ', o['begin']);
|
||||||
// <Parking index="0" type="gate" name="GA_Parking" lat="S9 25.739923" lon="E160 2.927602" heading="67" radius="44" airlineCodes="" />
|
// <Parking index="0" type="gate" name="GA_Parking" lat="S9 25.739923" lon="E160 2.927602" heading="67" radius="44" airlineCodes="" />
|
||||||
return { '@index': String(o['begin']), '@lat': convertLat(o._latlngs[0]), '@lon': convertLon(o._latlngs[0]), '@isOnRunway': '0', '@type': 'begin' };
|
return { '@index': String(o['begin']), '@lat': convertLat(o._latlngs[0]), '@lon': convertLon(o._latlngs[0]), '@isOnRunway': '0', '@type': 'begin' };
|
||||||
}
|
}
|
||||||
@ -255,7 +258,7 @@ var mapBeginNode = function (o) {
|
|||||||
|
|
||||||
var mapEndNode = function (o) {
|
var mapEndNode = function (o) {
|
||||||
if (o instanceof L.TaxiwaySegment) {
|
if (o instanceof L.TaxiwaySegment) {
|
||||||
console.debug(o);
|
console.debug('Map End : ', o['end']);
|
||||||
// <Parking index="0" type="gate" name="GA_Parking" lat="S9 25.739923" lon="E160 2.927602" heading="67" radius="44" airlineCodes="" />
|
// <Parking index="0" type="gate" name="GA_Parking" lat="S9 25.739923" lon="E160 2.927602" heading="67" radius="44" airlineCodes="" />
|
||||||
return { '@index': String(o['end']), '@lat': convertLat(o._latlngs[1]), '@lon': convertLon(o._latlngs[1]), '@isOnRunway': '0', '@type': 'end' };
|
return { '@index': String(o['end']), '@lat': convertLat(o._latlngs[1]), '@lon': convertLon(o._latlngs[1]), '@isOnRunway': '0', '@type': 'end' };
|
||||||
}
|
}
|
||||||
@ -295,6 +298,8 @@ var styleArc = function (attributes, arc) {
|
|||||||
} else {
|
} else {
|
||||||
arc['@isPushBackRoute'] = "0";
|
arc['@isPushBackRoute'] = "0";
|
||||||
}
|
}
|
||||||
|
if ( attributes.name !== '' && attributes.name !== 'undefined') {
|
||||||
arc['@name'] = attributes.name;
|
arc['@name'] = attributes.name;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user