From d317bd049c26fe08e7bb3c780a3fe450c17339bf Mon Sep 17 00:00:00 2001 From: Keith Paterson Date: Fri, 8 Jan 2021 09:13:56 +0100 Subject: [PATCH] #109 Fixed --- src/renderer/components/EditLayer.vue | 4 +--- src/renderer/components/ThresholdLayer.vue | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index 2c0a8d2..83d84b4 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -22,7 +22,6 @@ You should have received a copy of the GNU General Public License along with FG import L2 from 'leaflet-textpath' import Vue from 'vue' import { MessageBox } from 'element-ui'; - import { EventBus } from './event-bus.js'; const turf = require('@turf/turf') @@ -152,11 +151,10 @@ You should have received a copy of the GNU General Public License along with FG } }) console.log(this.groundnetLayerGroup.maxId) + this.buildLookup() this.groundnetLayerGroup.addTo(this.$parent.mapObject) this.icao = icao - console.log(EventBus) - EventBus.$emit('i-got-clicked', 1); }, visible (feature) { let bounds = this.$store.state.Settings.bounds diff --git a/src/renderer/components/ThresholdLayer.vue b/src/renderer/components/ThresholdLayer.vue index 6de117b..57ed70d 100644 --- a/src/renderer/components/ThresholdLayer.vue +++ b/src/renderer/components/ThresholdLayer.vue @@ -34,15 +34,17 @@ }, methods: { editedThreshold () { - var rwy = this.$store.state.Editable.data.threshold.runway - var displacement = this.$store.state.Editable.data.threshold.displacement - this.layerGroup.eachLayer(l => { - if (l instanceof L.Threshold) { - if (l.rwy === rwy) { - l.setDisplacement(displacement) + if (this.$store.state.Editable.data.threshold) { + var rwy = this.$store.state.Editable.data.threshold.runway + var displacement = this.$store.state.Editable.data.threshold.displacement + this.layerGroup.eachLayer(l => { + if (l instanceof L.Threshold) { + if (l.rwy === rwy) { + l.setDisplacement(displacement) + } } - } - }) + }) + } }, getLayer () { return this.layerGroup