# HG changeset patch # User Thomas Junk # Date 1571057091 -7200 # Node ID a89e4db7980b64b5a8b306afd5fa8912ec9eb18e # Parent 1e96ff2da1f3fb7b38508675363afc05dc283def Add delta to reference waterlevel to current depth. If the current waterlevel is at LDC the delta is 0 and the profile is drawn unchanged. If the current waterlevel is higher the delta adds to the measured depth. If the current waterlevel is below the delta subtracts from the measured depth. diff -r 1e96ff2da1f3 -r a89e4db7980b client/src/components/fairway/Fairwayprofile.vue --- a/client/src/components/fairway/Fairwayprofile.vue Mon Oct 14 13:17:02 2019 +0200 +++ b/client/src/components/fairway/Fairwayprofile.vue Mon Oct 14 14:44:51 2019 +0200 @@ -644,9 +644,7 @@ return xScale(d.x); }) .y(d => - yScaleRight( - d.y + Math.abs(this.waterlevel - this.refWaterlevel) / 100 - ) + yScaleRight(d.y + this.waterlevel - this.refWaterlevel / 100) ); let profileArea = d3 .area() @@ -655,9 +653,7 @@ }) .y0(height) .y1(d => - yScaleRight( - d.y + Math.abs(this.waterlevel - this.refWaterlevel) / 100 - ) + yScaleRight(d.y + (this.waterlevel - this.refWaterlevel) / 100) ); graph .append("path")