Mercurial > gemma
changeset 4657:a89e4db7980b
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.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Mon, 14 Oct 2019 14:44:51 +0200 |
parents | 1e96ff2da1f3 |
children | 92a7551d626f aa3a1e7e9527 |
files | client/src/components/fairway/Fairwayprofile.vue |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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")