# HG changeset patch # User Fadi Abbud # Date 1571153514 -7200 # Node ID 6c1dd2fbe2ee245c8bb9a0a160f8e86586b566f9 # Parent e1cf039ea25a28b4bcadca800cd091a4866d19f1 client: include bottlenecks name in pdf-filename if layer is visible diff -r e1cf039ea25a -r 6c1dd2fbe2ee client/src/components/Pdftool.vue --- 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, "-")}`;