# HG changeset patch # User Fadi Abbud # Date 1570443126 -7200 # Node ID cb1f62335b009f084e914cd7c0ca2f6573d7a290 # Parent 7fb29172befa8f2fde85ff7976ead6e6ce48ebdf Client: fairwayprofile: fix drawing of fairway-box * pass the opacity in the (rgba) value instead of additional attribute for it. diff -r 7fb29172befa -r cb1f62335b00 client/src/components/fairway/Fairwayprofile.vue --- 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})`);