changeset 3926:3ebde6dd336f

client: pdf-gen: fix rendering part of diagram (fairwayprofile)
author Fadi Abbud <fadi.abbud@intevation.de>
date Thu, 11 Jul 2019 16:25:56 +0200
parents 4f93bfb5725d
children 03f37e64701c
files client/src/components/fairway/Fairwayprofile.vue
diffstat 1 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/fairway/Fairwayprofile.vue	Thu Jul 11 16:21:09 2019 +0200
+++ b/client/src/components/fairway/Fairwayprofile.vue	Thu Jul 11 16:25:56 2019 +0200
@@ -524,12 +524,22 @@
             .datum([{ x: startPoint, y: depth }, { x: endPoint, y: depth }])
             .attr(
               "fill",
-              `rgba(${this.getLayerStyle(data.los).fillColor.join(",")})`
+              `#${this.getLayerStyle(data.los)
+                .fillColor.map(x => {
+                  if (x < 10) return "0" + x.toString(16);
+                  return x.toString(16);
+                })
+                .join("")}`
             )
             .attr("fill-opacity", this.getLayerStyle(data.los).fillOpacity)
             .attr(
               "stroke",
-              `rgba(${this.getLayerStyle(data.los).strokeColor.join(",")})`
+              `#${this.getLayerStyle(data.los)
+                .strokeColor.map(x => {
+                  if (x < 10) return "0" + x.toString(16);
+                  return x.toString(16);
+                })
+                .join("")}`
             )
             .attr("stroke-opacity", this.getLayerStyle(data.los).strokeOpacity)
             .attr("stroke-dasharray", this.getLayerStyle(data.los).strokeDash)