Mercurial > gemma
comparison client/src/components/gauge/HydrologicalConditions.vue @ 3965:2aaa1948b525 diagram-cleanup
client: diagrams: moved downloadPDF function to mixin
and thereby unified how titles are created
author | Markus Kottlaender <markus@intevation.de> |
---|---|
date | Fri, 12 Jul 2019 15:32:15 +0200 |
parents | afc7bca44df4 |
children | 2f024d6189ca |
comparison
equal
deleted
inserted
replaced
3964:afc7bca44df4 | 3965:2aaa1948b525 |
---|---|
170 this.paneSetup === "GAUGE_WATERLEVEL_HYDROLOGICALCONDITIONS" | 170 this.paneSetup === "GAUGE_WATERLEVEL_HYDROLOGICALCONDITIONS" |
171 ? "GAUGE_WATERLEVEL" | 171 ? "GAUGE_WATERLEVEL" |
172 : "DEFAULT" | 172 : "DEFAULT" |
173 ); | 173 ); |
174 }, | 174 }, |
175 downloadPDF() { | |
176 let diagramTitle = | |
177 this.gaugeInfo(this.selectedGauge) + | |
178 ": Hydrological Conditions " + | |
179 this.longtermInterval.join(" - "); | |
180 | |
181 this.generatePDF({ | |
182 templateData: this.templateData, | |
183 diagramTitle: diagramTitle | |
184 }); | |
185 | |
186 this.pdf.doc.save( | |
187 this.selectedGauge.properties.objname + | |
188 " Hydrological-condition Diagram.pdf" | |
189 ); | |
190 }, | |
191 // Diagram legend | 175 // Diagram legend |
192 addDiagramLegend(position, offset, color) { | 176 addDiagramLegend(position, offset, color) { |
193 let x = offset.x, | 177 let x = offset.x, |
194 y = offset.y; | 178 y = offset.y; |
195 let width = | 179 let width = |