changeset 3894:e5bd8601bee1

Client: remove unnecessary condition and comments (waterlevels,hydrologicalconditions)
author Fadi Abbud <fadi.abbud@intevation.de>
date Wed, 10 Jul 2019 15:26:45 +0200
parents 9dfd225b92e8
children 07b2df71bb4a
files client/src/components/gauge/HydrologicalConditions.vue client/src/components/gauge/Waterlevel.vue
diffstat 2 files changed, 0 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- 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;
       }
--- 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;
       }