changeset 2259:7e378b38d302

client: pdf-gen: made selectedSurvey mandatory for displaying the bottleneck info box and iso line legend. The code for the info box needs a selected survey although it's possible to have only a bottleneck selected but no survey. So requiring a selectedSurvey for printing this box (and legend) was the simplest way of fixng that.
author Markus Kottlaender <markus@intevation.de>
date Thu, 14 Feb 2019 10:09:23 +0100
parents 24cafd6b1a55
children 531e776cb81d
files client/src/components/Pdftool.vue
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Pdftool.vue	Thu Feb 14 10:00:11 2019 +0100
+++ b/client/src/components/Pdftool.vue	Thu Feb 14 10:09:23 2019 +0100
@@ -633,6 +633,7 @@
     addLegend(position, offset, rounding) {
       if (
         this.selectedBottleneck &&
+        this.selectedSurvey &&
         this.getLayerByName("Bottleneck isolines").isVisible
       ) {
         // transforming into an HTMLImageElement only to find out
@@ -671,6 +672,7 @@
     addBottleneckInfo(position, offset, rounding, color) {
       if (
         this.selectedBottleneck &&
+        this.selectedSurvey &&
         this.getLayerByName("Bottleneck isolines").isVisible
       ) {
         let survey = this.selectedSurvey;