changeset 3819:27bfa6b0c194 yworks-svg2pdf

Fairwayprofile with svg2pdf call and as lookup
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 05 Jul 2019 12:54:27 +0200
parents 242057dbc8c3
children ee0066dcfb93
files client/src/components/fairway/Fairwayprofile.vue
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/fairway/Fairwayprofile.vue	Fri Jul 05 12:39:19 2019 +0200
+++ b/client/src/components/fairway/Fairwayprofile.vue	Fri Jul 05 12:54:27 2019 +0200
@@ -368,7 +368,7 @@
     addDiagram(position, offset, width, height) {
       let x = offset.x,
         y = offset.y;
-      let svg = document.querySelector("#pdfContainer>svg");
+      let svg = this.$refs.pdfContainer.getElementsByTagName("svg")[0];
       // use default width,height if they are missing in the template definition
       if (!width) {
         width = this.templateData.properties.paperSize === "a3" ? 380 : 290;
@@ -386,7 +386,7 @@
         xOffset: x,
         yOffset: y,
         // TODO depend on the size and aspect ration on paper
-        scale: this.templateData.properties.paperSize === "a3" ? 0.45 : 0.25
+        scale: this.templateData.properties.paperSize === "a3" ? 0.45 : 0.18
       });
     },
     // Diagram legend