# HG changeset patch # User Fadi Abbud # Date 1553244492 -3600 # Node ID 3063f1485ad6606976ca2900bc9dfe22fd14b2ee # Parent 1f173d1a731dde8f675013fb64fd9b01c84c508d client:fix typo * scalenominator diff -r 1f173d1a731d -r 3063f1485ad6 client/src/components/Pdftool.vue --- 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)