Mercurial > gemma
changeset 3887:83c4672369a2
hydrological conditions: diagram size dynamic - taken from template
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Wed, 10 Jul 2019 12:47:24 +0200 |
parents | 9fa9a485c182 |
children | ccd77fe5072c |
files | client/src/components/gauge/HydrologicalConditions.vue |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/gauge/HydrologicalConditions.vue Wed Jul 10 12:19:23 2019 +0200 +++ b/client/src/components/gauge/HydrologicalConditions.vue Wed Jul 10 12:47:24 2019 +0200 @@ -243,8 +243,8 @@ addDiagram(position, offset, width, height) { let x = offset.x, y = offset.y; - const svgWidth = 1550; - const svgHeight = 400; + const svgWidth = this.millimeter2pixels(width, 80); + const svgHeight = this.millimeter2pixels(height, 80); // check if there are tow diagrams on the screen // draw the diagram in a separated html element to get the full size const offScreen = document.querySelector("#offScreen"); @@ -275,7 +275,7 @@ xOffset: x, yOffset: y, // TODO depend on the size and aspect ration on paper - scale: this.templateData.properties.paperSize === "a3" ? 0.45 : 0.18 + scale: 0.2 }); offScreen.removeChild(svg); },