# HG changeset patch # User Thomas Junk # Date 1562755644 -7200 # Node ID 83c4672369a235a2d7daf29dc0af0170e9de7e7e # Parent 9fa9a485c18203340a8aa9e5586991c86d10df58 hydrological conditions: diagram size dynamic - taken from template diff -r 9fa9a485c182 -r 83c4672369a2 client/src/components/gauge/HydrologicalConditions.vue --- 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); },