changeset 2767:3063f1485ad6

client:fix typo * scalenominator
author Fadi Abbud <fadi.abbud@intevation.de>
date Fri, 22 Mar 2019 09:48:12 +0100
parents 1f173d1a731d
children 0d9c006ac25a
files client/src/components/Pdftool.vue
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/Pdftool.vue	Thu Mar 21 21:40:11 2019 +0100
+++ b/client/src/components/Pdftool.vue	Fri Mar 22 09:48:12 2019 +0100
@@ -287,11 +287,11 @@
           proj.getMetersPerUnit();
         // DEBUG console.log("metersPerPixel = ", metersPerPixel);
 
-        let scaleNominator = Math.round(
+        let scaleDenominator = Math.round(
           // the x in 1:x map scale
           1000 * pixelsPerMapMillimeter * metersPerPixel
         );
-        console.log("scaleNominator = ", scaleNominator);
+        console.log("scaleDenominator = ", scaleDenominator);
 
         var data = canvas.toDataURL("image/jpeg");
         this.pdf.doc.addImage(
@@ -386,7 +386,7 @@
               }
               case "scalebar": {
                 this.addScaleBar(
-                  scaleNominator,
+                  scaleDenominator,
                   e.position,
                   e.offset || defaultOffset,
                   e.rounding === 0 || e.rounding ? e.rounding : defaultRounding,
@@ -396,7 +396,7 @@
               }
               case "scale": {
                 this.addScale(
-                  scaleNominator,
+                  scaleDenominator,
                   e.position,
                   e.width,
                   e.offset || defaultOffset,
@@ -446,12 +446,12 @@
       this.readyToGenerate = true;
     },
     // add the used map scale and papersize
-    addScale(scalenominator, position, width, offset, fontSize, color) {
+    addScale(scaleDenominator, position, width, offset, fontSize, color) {
       //TODO: check the correctence of the scalnominator value here.
       let str =
         this.$gettext("Scale") +
         " 1 : " +
-        scalenominator +
+        scaleDenominator +
         " " +
         "(DIN" +
         " " +
@@ -578,8 +578,8 @@
 
       this.pdf.doc.addImage(image, x, y, width, height);
     },
-    addScaleBar(scaleNominator, position, offset, rounding, brcolor) {
-      // scaleNominator is the x in 1:x of the map scale
+    addScaleBar(scaleDenominator, position, offset, rounding, brcolor) {
+      // scaleDenominator is the x in 1:x of the map scale
 
       // hardcode maximal width for now
       let maxWidth = 80; // in mm
@@ -598,7 +598,7 @@
           return Math.log(x) * Math.LOG10E;
         };
 
-      let maxLength = maxWidth * scaleNominator;
+      let maxLength = maxWidth * scaleDenominator;
 
       let unit = "mm";
       let unitConversionFactor = 1;
@@ -635,7 +635,7 @@
         length = factor;
       }
 
-      let size = (length * unitConversionFactor) / scaleNominator / 4;
+      let size = (length * unitConversionFactor) / scaleDenominator / 4;
       let fullSize = size * 4;
 
       // x/y defaults to offset for topleft corner (normal x/y coordinates)