diff client/src/lib/mixins.js @ 3273:050e72ce5cf7

client: diagram-template: add template elements and get templates from backend(fairway avalibilty)
author Fadi Abbud <fadi.abbud@intevation.de>
date Wed, 15 May 2019 15:31:33 +0200
parents 0c5a28ffe9ee
children aac1ca73e92a
line wrap: on
line diff
--- a/client/src/lib/mixins.js	Wed May 15 14:54:53 2019 +0200
+++ b/client/src/lib/mixins.js	Wed May 15 15:31:33 2019 +0200
@@ -142,6 +142,13 @@
 
       this.addRoundedBox(x, y, width, height, color, rounding, brcolor);
     },
+    getTextHeight(numberOfLines) {
+      return (
+        numberOfLines *
+        ((this.pdf.doc.getFontSize() * 25.4) / 80) *
+        this.pdf.doc.getLineHeightFactor()
+      );
+    },
     addRoundedBox(x, y, w, h, color, rounding, brcolor) {
       // draws a rounded background box at (x,y) width x height
       // using jsPDF units