# HG changeset patch # User Fadi Abbud # Date 1550564007 -3600 # Node ID c00e3f7f5b178d0b0cb8af9d44661fefd0a81a93 # Parent f2c67ebeaabbb831cd99c56c551417b9a31e204e client: use constant names instead of strings diff -r f2c67ebeaabb -r c00e3f7f5b17 client/src/components/Pdftool.vue --- a/client/src/components/Pdftool.vue Tue Feb 19 08:41:31 2019 +0100 +++ b/client/src/components/Pdftool.vue Tue Feb 19 09:13:27 2019 +0100 @@ -104,6 +104,7 @@ import locale2 from "locale2"; import { HTTP } from "../lib/http"; import { displayError } from "@/lib/errors.js"; +import { LAYERS } from "@/store/map.js"; var paperSizes = { // in millimeter, landscape [width, height] @@ -681,7 +682,7 @@ if ( this.selectedBottleneck && this.selectedSurvey && - this.getLayerByName("Bottleneck isolines").isVisible + this.getLayerByName(LAYERS.BOTTLENECKISOLINE).isVisible ) { // transforming into an HTMLImageElement only to find out // the width x height of the legend image @@ -720,7 +721,7 @@ if ( this.selectedBottleneck && this.selectedSurvey && - this.getLayerByName("Bottleneck isolines").isVisible + this.getLayerByName(LAYERS.BOTTLENECKISOLINE).isVisible ) { let survey = this.selectedSurvey;