Mercurial > gemma
changeset 4674:3b7de89527a3
custom fairway box limit to diagram
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 15 Oct 2019 16:05:43 +0200 |
parents | 443867b548b5 |
children | a586de1b4466 |
files | client/src/components/fairway/Fairwayprofile.vue |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/fairway/Fairwayprofile.vue Tue Oct 15 15:59:38 2019 +0200 +++ b/client/src/components/fairway/Fairwayprofile.vue Tue Oct 15 16:05:43 2019 +0200 @@ -466,6 +466,8 @@ for (let data of this.fairwayData) { data.coordinates.forEach(coordinates => { const [startPoint, endPoint, depth] = coordinates; + let customdepth = + this.depth < this.maxAlt ? this.depth : this.maxAlt * 1.1; let fairwayArea = d3 .area() .x(function(d) { @@ -478,8 +480,8 @@ graph .append("path") .datum([ - { x: startPoint, y: this.useCustomDepth ? this.depth : depth }, - { x: endPoint, y: this.useCustomDepth ? this.depth : depth } + { x: startPoint, y: this.useCustomDepth ? customdepth : depth }, + { x: endPoint, y: this.useCustomDepth ? customdepth : depth } ]) .attr("fill", `${this.getLayerStyle(data.los).fillColor}`) .attr("stroke", `${this.getLayerStyle(data.los).strokeColor}`)