From 07c7caff2fc949ef89218441870411f54e2f7499 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Fri, 14 Feb 2020 13:32:17 +0100 Subject: [PATCH] Minor changes --- src/renderer/components/EditLayer.vue | 11 +++++++++++ src/renderer/components/FlightgearMap.vue | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/EditLayer.vue b/src/renderer/components/EditLayer.vue index c2a951b..a1c3a33 100644 --- a/src/renderer/components/EditLayer.vue +++ b/src/renderer/components/EditLayer.vue @@ -391,6 +391,17 @@ writeGroundnetXML(this.$store.state.Settings.settings.airportsDirectory, this.icao, xml) }, setVisible(visible) { + if (this.layerGroup) { + if (visible) { + this.layerGroup.addTo(this.$parent.mapObject) + } else { + this.layerGroup.removeFrom(this.$parent.mapObject) + } + } + + if (this.groundnetLayerGroup === undefined) { + return; + } if (visible) { this.groundnetLayerGroup.addTo(this.$parent.mapObject) } else { diff --git a/src/renderer/components/FlightgearMap.vue b/src/renderer/components/FlightgearMap.vue index cc6cdad..246d5f5 100644 --- a/src/renderer/components/FlightgearMap.vue +++ b/src/renderer/components/FlightgearMap.vue @@ -122,13 +122,13 @@ this.$refs.airportLayer.setVisible(zoom < 12) } }, - centerUpdated (center) { + async centerUpdated (center) { if (center !== this.$store.state.Settings.center) { this.$store.dispatch('setCenter', center) this.$refs.airportLayer.setVisible(this.zoom < 12) } }, - boundsUpdated (bounds) { + async boundsUpdated (bounds) { if (bounds !== this.$store.state.Settings.bounds) { this.$store.dispatch('setBounds', bounds) this.$refs.airportLayer.setVisible(this.zoom < 12)