changeset 3908:976c83b6f479

client: pdf-gen: set diagram scale on pdf and adjust default template values(fairwayprofile)
author Fadi Abbud <fadi.abbud@intevation.de>
date Thu, 11 Jul 2019 09:18:59 +0200
parents 7b172a1fd9e7
children 2e7f191bba27
files client/src/components/fairway/Fairwayprofile.vue
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/fairway/Fairwayprofile.vue	Wed Jul 10 17:16:59 2019 +0200
+++ b/client/src/components/fairway/Fairwayprofile.vue	Thu Jul 11 09:18:59 2019 +0200
@@ -187,9 +187,9 @@
           {
             type: "diagram",
             position: "topleft",
-            offset: { x: 20, y: 60 },
-            width: 280,
-            height: 90
+            offset: { x: 18, y: 60 },
+            width: 190,
+            height: 52
           },
           {
             type: "diagramtitle",
@@ -398,8 +398,7 @@
       svg2pdf(svg, this.pdf.doc, {
         xOffset: x,
         yOffset: y,
-        // TODO depend on the size and aspect ration on paper
-        scale: this.templateData.properties.paperSize === "a3" ? 0.3 : 0.27
+        scale: 0.353
       });
       offScreen.removeChild(svg);
     },