changeset 3884:db24b4347604

client: pdf-gen: fix bug of not rendering some elements on pdf(hydrologicalconditions) * svg2pdf stop rendering the next elements if widht,height attributes are missing in rect element.
author Fadi Abbud <fadi.abbud@intevation.de>
date Wed, 10 Jul 2019 12:00:58 +0200
parents 0b382767b5ab
children d42158f77841
files client/src/components/gauge/HydrologicalConditions.vue
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/gauge/HydrologicalConditions.vue	Wed Jul 10 11:55:06 2019 +0200
+++ b/client/src/components/gauge/HydrologicalConditions.vue	Wed Jul 10 12:00:58 2019 +0200
@@ -551,7 +551,11 @@
       svg
         .selectAll(".chart-tooltip rect")
         .attr("fill", "#fff")
-        .attr("stroke", "#ccc");
+        .attr("stroke", "#ccc")
+        // set width,height attributes for rect element in case d3 does not
+        // generate them to let svg2pdf continue rendernig of the following elements
+        .attr("width", "0px")
+        .attr("height", "0px");
       svg
         .selectAll(".chart-tooltip text")
         .attr("fill", "666")