# HG changeset patch # User Thomas Junk # Date 1571396150 -7200 # Node ID ac2c82719f7b27ab34ad999f23ea396cb82c7eb3 # Parent b88ab93dcb2c20e0eff7b1c00e81b7b780de1757 fairway profile: fix box rendering diff -r b88ab93dcb2c -r ac2c82719f7b client/src/components/fairway/Fairwayprofile.vue --- a/client/src/components/fairway/Fairwayprofile.vue Fri Oct 18 12:18:23 2019 +0200 +++ b/client/src/components/fairway/Fairwayprofile.vue Fri Oct 18 12:55:50 2019 +0200 @@ -485,11 +485,10 @@ for (let data of this.fairwayData) { data.coordinates.forEach(coordinates => { const [startPoint, endPoint, depth] = coordinates; + const referenceDepth = + this.maxAlt * 1.1 + (this.waterlevel - this.refWaterlevel) / 100; let customdepth = - this.depth < this.maxAlt * 1.1 - ? this.depth - : this.maxAlt * 1.1 + - (this.waterlevel - this.refWaterlevel) / 100; + this.depth < referenceDepth ? this.depth : referenceDepth; let fairwayArea = d3 .area() .x(function(d) {