changeset 4679:6c1dd2fbe2ee

client: include bottlenecks name in pdf-filename if layer is visible
author Fadi Abbud <fadi.abbud@intevation.de>
date Tue, 15 Oct 2019 17:31:54 +0200
parents e1cf039ea25a
children 976aedc195e5
files client/src/components/Pdftool.vue
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Pdftool.vue	Tue Oct 15 17:25:23 2019 +0200
+++ b/client/src/components/Pdftool.vue	Tue Oct 15 17:31:54 2019 +0200
@@ -208,7 +208,12 @@
     },
     filename() {
       let filename = "map";
-      if (this.bottleneckForPrint) {
+      if (
+        this.bottleneckForPrint &&
+        this.openLayersMap()
+          .getLayer("BOTTLENECKISOLINE")
+          .getVisible()
+      ) {
         // TODO: Check if the view contains the selected bottleneck
         // to avoid including bottleneck info in pdf in case view has changed to another location
         filename = `BN-${sanitize(this.bottleneckForPrint).replace(/ /g, "-")}`;