# HG changeset patch # User Markus Kottlaender # Date 1550135363 -3600 # Node ID 7e378b38d302c37818ffe927e0714284eec17697 # Parent 24cafd6b1a55af47fb0b47c2e4d35ff0706823bb 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. diff -r 24cafd6b1a55 -r 7e378b38d302 client/src/components/Pdftool.vue --- 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;