diff client/src/lib/mixins.js @ 3544:067ad32fba69

client: diagram-template: improve values of template elements * add default values to template elements to use if some are missing in the template definition
author Fadi Abbud <fadi.abbud@intevation.de>
date Fri, 31 May 2019 11:08:27 +0200
parents 5c4f117d8f98
children f86220aa8a72
line wrap: on
line diff
--- a/client/src/lib/mixins.js	Fri May 31 09:35:52 2019 +0200
+++ b/client/src/lib/mixins.js	Fri May 31 11:08:27 2019 +0200
@@ -130,6 +130,10 @@
           image.src = "/img/gemma-logo-for-pdf.png";
         }
       }
+      if (format === "") {
+        let tmp = image.src.split(".");
+        format = tmp[tmp.length - 1].toUpperCase();
+      }
       this.pdf.doc.addImage(image, format, x, y, width, height);
     },
     // add text at specific coordinates with a background box