changeset 845:596ef3b46028

WIP Fairwayprofile
author Thomas Junk <thomas.junk@intevation.de>
date Fri, 28 Sep 2018 11:48:57 +0200
parents c2cba785ca4d
children 6902032757e4
files client/src/application/Main.vue client/src/fairway/Fairwayprofile.vue
diffstat 2 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/application/Main.vue	Fri Sep 28 11:40:28 2018 +0200
+++ b/client/src/application/Main.vue	Fri Sep 28 11:48:57 2018 +0200
@@ -53,7 +53,8 @@
       return [this.xScale.x, this.xScale.y];
     },
     yAxisLeft() {
-      return [this.yScaleLeft.lo, this.yScaleLeft.hi];
+      const hi = Math.max(this.maxAlt, this.selectedWaterLevel);
+      return [this.yScaleLeft.lo, hi];
     },
     yAxisRight() {
       const hi =
--- a/client/src/fairway/Fairwayprofile.vue	Fri Sep 28 11:40:28 2018 +0200
+++ b/client/src/fairway/Fairwayprofile.vue	Fri Sep 28 11:48:57 2018 +0200
@@ -145,10 +145,7 @@
           });
         graph
           .append("path")
-          .datum([
-            { x: startPoint, y: -depth + this.selectedWaterLevel },
-            { x: endPoint, y: -depth + this.selectedWaterLevel }
-          ])
+          .datum([{ x: startPoint, y: depth }, { x: endPoint, y: depth }])
           .attr("fill", "#002AFF")
           .attr("stroke-opacity", 0.65)
           .attr("fill-opacity", 0.65)