changeset 4523:cb1f62335b00

Client: fairwayprofile: fix drawing of fairway-box * pass the opacity in the (rgba) value instead of additional attribute for it.
author Fadi Abbud <fadi.abbud@intevation.de>
date Mon, 07 Oct 2019 12:12:06 +0200
parents 7fb29172befa
children 7cca4aa9a04a
files client/src/components/fairway/Fairwayprofile.vue
diffstat 1 files changed, 2 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/fairway/Fairwayprofile.vue	Mon Oct 07 11:03:05 2019 +0200
+++ b/client/src/components/fairway/Fairwayprofile.vue	Mon Oct 07 12:12:06 2019 +0200
@@ -287,17 +287,10 @@
 
       // use spread operator to clone arrays
       let fillColor = style.getFill().getColor();
-      let fillOpacity =
-        fillColor.length < 8
-          ? 0.8
-          : parseFloat(parseInt(fillColor.slice(7), 16) / 255).toFixed(2);
+
       let strokeColor = style.getStroke().getColor();
-      let strokeOpacity =
-        strokeColor.length < 8
-          ? 0.8
-          : parseFloat(parseInt(strokeColor.slice(7), 16) / 255).toFixed(2);
       let strokeDash = style.getStroke().getLineDash();
-      return { fillColor, fillOpacity, strokeColor, strokeOpacity, strokeDash };
+      return { fillColor, strokeColor, strokeDash };
     },
     applyChange() {
       if (this.form.template.hasOwnProperty("properties")) {
@@ -479,9 +472,7 @@
               { x: endPoint, y: this.useCustomDepth ? this.depth : depth }
             ])
             .attr("fill", `${this.getLayerStyle(data.los).fillColor}`)
-            .attr("fill-opacity", this.getLayerStyle(data.los).fillOpacity)
             .attr("stroke", `${this.getLayerStyle(data.los).strokeColor}`)
-            .attr("stroke-opacity", this.getLayerStyle(data.los).strokeOpacity)
             .attr("stroke-dasharray", this.getLayerStyle(data.los).strokeDash)
             .attr("d", fairwayArea)
             .attr("transform", `translate(0 ${-offsetY})`);