changeset 3344:107de6def0c3

client: diagram-template: cleanup * remove unwanted line
author Fadi Abbud <fadi.abbud@intevation.de>
date Tue, 21 May 2019 10:11:08 +0200
parents 13bb0ff62ac8
children 954f8b751fb0
files client/src/lib/mixins.js
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/lib/mixins.js	Tue May 21 09:52:01 2019 +0200
+++ b/client/src/lib/mixins.js	Tue May 21 10:11:08 2019 +0200
@@ -109,7 +109,6 @@
     addImage(url, format, position, offset, width, height) {
       let x = offset.x;
       let y = offset.y;
-      //roundup-intern.intevation.de/wamos/issue416
       if (["topright", "bottomright"].indexOf(position) !== -1) {
         x = this.pdf.width - offset.x - width;
       }
@@ -157,6 +156,8 @@
       let x = offset.x,
         y = offset.y;
       this.pdf.doc.setFontSize(size);
+      this.pdf.doc.setFontStyle("bold");
+      this.pdf.doc.setTextColor(color);
       let width =
         (this.pdf.doc.getStringUnitWidth(text) * size) / (72 / 25.6) + size / 2;
       // if position is on the right, x needs to be calculate with pdf width and
@@ -167,8 +168,6 @@
       if (["bottomright", "bottomleft"].indexOf(position) !== -1) {
         y = this.pdf.height - offset.y - this.getTextHeight(1);
       }
-      this.pdf.doc.setTextColor(color);
-      this.pdf.doc.setFontStyle("bold");
       this.pdf.doc.text(text, x, y, { baseline: "hanging" });
     },
     addRoundedBox(x, y, w, h, color, rounding, brcolor) {