From 7625ea1cf946274212d4b476f45bb9ddd4d3d1c4 Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Tue, 12 Jan 2021 19:39:50 +0100 Subject: [PATCH] Small fixes --- src/renderer/components/EditLayer.vue | 2 +- src/renderer/loaders/TaxiwaySegmentExtender.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index b85c8ed..70bfa21 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -955,7 +955,7 @@ You should have received a copy of the GNU General Public License along with FG nearest.push({d: distance, l: layer, latlng: latlng.__vertex.latlng, glueindex: latlng.glueindex }) } } else { - console.error("No __Vertex"); + console.error("No __Vertex", latlng); } }) } diff --git a/src/renderer/loaders/TaxiwaySegmentExtender.js b/src/renderer/loaders/TaxiwaySegmentExtender.js index bf1f755..7d50ea6 100644 --- a/src/renderer/loaders/TaxiwaySegmentExtender.js +++ b/src/renderer/loaders/TaxiwaySegmentExtender.js @@ -56,7 +56,7 @@ const extendTaxiSegment = function (taxiwaySegment) { taxiwaySegment.__proto__.selectVertex = function (index) { this.getLatLngs().forEach(element => { if (Number(element.glueindex) === index) { - if (element.__vertex._icon != null) { + if (element.__vertex !== undefined && element.__vertex._icon != null) { element.__vertex.__proto__.deselect = function () { if (this._icon != null) { this._icon.style.setProperty('background-color', 'white'); @@ -159,7 +159,11 @@ const extendTaxiSegment = function (taxiwaySegment) { if (event.target.options.attributes.name !== undefined) { multiarc.name = assign(event.target.options.attributes.name); } - multiarc.isPushBackRoute = assign(event.target.options.attributes.isPushBackRoute); + if(event.target.options.attributes.isPushBackRoute) { + multiarc.isPushBackRoute = assign(event.target.options.attributes.isPushBackRoute); + } else { + multiarc.isPushBackRoute = false; + } multiarc.direction = assign(event.target.options.attributes.direction); this.editLayer.featureLookup[900719925474099] = [];