Mercurial > gemma
changeset 807:34b2cfcab24c
Fairwayprofile
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 27 Sep 2018 16:13:59 +0200 |
parents | 5ef542130865 |
children | e10a8a682297 |
files | client/src/fairway/Fairwayprofile.vue |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/fairway/Fairwayprofile.vue Thu Sep 27 16:10:59 2018 +0200 +++ b/client/src/fairway/Fairwayprofile.vue Thu Sep 27 16:13:59 2018 +0200 @@ -130,7 +130,7 @@ width }); }, - drawFairway({ graph, height, xScale, yScaleRight }) { + drawFairway({ graph, xScale, yScaleRight }) { for (let coordinates of this.fairwayCoordinates) { const [startPoint, endPoint, depth] = coordinates; let fairwayArea = d3 @@ -138,13 +138,16 @@ .x(function(d) { return xScale(d.x); }) - .y0(height) + .y0(yScaleRight(this.selectedWaterLevel)) .y1(function(d) { return yScaleRight(d.y); }); graph .append("path") - .datum([{ x: startPoint, y: -depth }, { x: endPoint, y: -depth }]) + .datum([ + { x: startPoint, y: -depth + this.selectedWaterLevel }, + { x: endPoint, y: -depth + this.selectedWaterLevel } + ]) .attr("fill", "#002AFF") .attr("stroke", "#FFD20D") .attr("d", fairwayArea);