Mercurial > gemma
comparison client/src/components/gauge/Waterlevel.vue @ 3811:37e896990c99 yworks-svg2pdf
client: improve pdf generation towards vector diagrams
* Moving AvailableFairwayDepth.vue addDiagram to svg2pdf.
* Mark the scaling and aspect ration as todos for both vector diagrams
in pdf generation AvailableFairwayDepth.vue and Waterlevel.vue.
author | Bernhard Reiter <bernhard@intevation.de> |
---|---|
date | Fri, 05 Jul 2019 10:50:55 +0200 |
parents | 7f2c5576ec0a |
children | ee0066dcfb93 |
comparison
equal
deleted
inserted
replaced
3810:68dc59b428df | 3811:37e896990c99 |
---|---|
312 | 312 |
313 let svg = document.getElementById(this.containerId).firstElementChild; | 313 let svg = document.getElementById(this.containerId).firstElementChild; |
314 svg2pdf(svg, this.pdf.doc, { | 314 svg2pdf(svg, this.pdf.doc, { |
315 xOffset: x, | 315 xOffset: x, |
316 yOffset: y, | 316 yOffset: y, |
317 // TODO depend on the size and aspect ration on paper | |
317 scale: this.templateData.properties.paperSize === "a3" ? 0.45 : 0.25 | 318 scale: this.templateData.properties.paperSize === "a3" ? 0.45 : 0.25 |
318 }); | 319 }); |
319 | 320 |
320 this.containerId = "waterlevel-diagram-container"; | 321 this.containerId = "waterlevel-diagram-container"; |
321 }, | 322 }, |