diff client/src/lib/mixins.js @ 4225:92c2f93fef3c

client: pdf-gen: export the selected time-range of diagram on pdf(waterlevels)
author Fadi Abbud <fadi.abbud@intevation.de>
date Mon, 19 Aug 2019 12:55:23 +0200
parents 552ea22ed266
children e58affd956c5
line wrap: on
line diff
--- a/client/src/lib/mixins.js	Mon Aug 19 12:27:19 2019 +0200
+++ b/client/src/lib/mixins.js	Mon Aug 19 12:55:23 2019 +0200
@@ -171,6 +171,7 @@
       const offScreen = document.querySelector("#offScreen");
       offScreen.style.width = `${svgWidth}px`;
       offScreen.style.height = `${svgHeight}px`;
+      let zoomLevel = this.zoomStore;
       const layout = this.getPrintLayout(svgHeight, svgWidth);
       this.renderTo({
         element: offScreen,
@@ -178,7 +179,8 @@
           svgWidth: svgWidth,
           svgHeight: svgHeight,
           ...layout
-        })
+        }),
+        zoomLevel // passing the zoom level to draw the diagram on pdf at this point
       });
       var svg = offScreen.querySelector("svg");
       if (["topright", "bottomright"].indexOf(position) !== -1) {