# HG changeset patch # User Fadi Abbud # Date 1562765205 -7200 # Node ID e5bd8601bee1e0a1f7071f53543ac69af197e453 # Parent 9dfd225b92e86e7f02ed0f7e131142d17ab03d9e Client: remove unnecessary condition and comments (waterlevels,hydrologicalconditions) diff -r 9dfd225b92e8 -r e5bd8601bee1 client/src/components/gauge/HydrologicalConditions.vue --- a/client/src/components/gauge/HydrologicalConditions.vue Wed Jul 10 15:23:32 2019 +0200 +++ b/client/src/components/gauge/HydrologicalConditions.vue Wed Jul 10 15:26:45 2019 +0200 @@ -245,7 +245,6 @@ y = offset.y; 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"); offScreen.style.width = `${svgWidth}px`; @@ -258,13 +257,6 @@ }) }); var svg = offScreen.querySelector("svg"); - // use default width,height if they are missing in the template definition - if (!width) { - width = this.templateData.properties.paperSize === "a3" ? 380 : 290; - } - if (!height) { - height = this.templateData.properties.paperSize === "a3" ? 130 : 100; - } if (["topright", "bottomright"].indexOf(position) !== -1) { x = this.pdf.width - offset.x - width; } diff -r 9dfd225b92e8 -r e5bd8601bee1 client/src/components/gauge/Waterlevel.vue --- a/client/src/components/gauge/Waterlevel.vue Wed Jul 10 15:23:32 2019 +0200 +++ b/client/src/components/gauge/Waterlevel.vue Wed Jul 10 15:26:45 2019 +0200 @@ -295,7 +295,6 @@ height, this.templateData.properties.resolution || 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"); offScreen.style.width = `${svgWidth}px`; @@ -308,13 +307,6 @@ }) }); var svg = offScreen.querySelector("svg"); - // use default width,height if they are missing in the template definition - if (!width) { - width = this.templateData.properties.paperSize === "a3" ? 380 : 290; - } - if (!height) { - height = this.templateData.properties.paperSize === "a3" ? 130 : 100; - } if (["topright", "bottomright"].indexOf(position) !== -1) { x = this.pdf.width - offset.x - width; }