# HG changeset patch # User Thomas Junk # Date 1538057639 -7200 # Node ID 34b2cfcab24cec7740733c3906222fe2c02fbf0d # Parent 5ef5421308659d555334017fc3fce3f7ccb95021 Fairwayprofile diff -r 5ef542130865 -r 34b2cfcab24c client/src/fairway/Fairwayprofile.vue --- 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);