diff client/src/components/fairway/AvailableFairwayDepth.vue @ 3347:cd745be63f71

available_fairway_depth: draw lower levels refactored
author Thomas Junk <thomas.junk@intevation.de>
date Tue, 21 May 2019 11:48:15 +0200
parents d5dbfba9faae
children ac0006f675c0
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepth.vue	Tue May 21 10:33:07 2019 +0200
+++ b/client/src/components/fairway/AvailableFairwayDepth.vue	Tue May 21 11:48:15 2019 +0200
@@ -467,9 +467,11 @@
         .data(d => d.lowerLevels)
         .enter()
         .append("rect")
-        .attr("y", this.yScale(0))
+        .attr("y", d => {
+          return 2 * this.yScale(0) - this.yScale(hoursInDays(d.translateY));
+        })
         .attr("height", d => {
-          return this.yScale(0) - this.yScale(hoursInDays(d));
+          return this.yScale(0) - this.yScale(hoursInDays(d.height));
         })
         .attr("width", this.barsWidth)
         .attr("fill", (d, i) => {