# HG changeset patch # User Thomas Junk # Date 1571147712 -7200 # Node ID c7dc1a6da93d2625b7ad18a9fb60ae69b9727ec9 # Parent 0cc339c4c35660c245c39a6fefbdb7dd2bf445f0 fairway_profile: calculate scales diff -r 0cc339c4c356 -r c7dc1a6da93d client/src/components/fairway/Fairwayprofile.vue --- a/client/src/components/fairway/Fairwayprofile.vue Tue Oct 15 15:44:07 2019 +0200 +++ b/client/src/components/fairway/Fairwayprofile.vue Tue Oct 15 15:55:12 2019 +0200 @@ -528,8 +528,7 @@ let yScaleRight = d3 .scaleLinear() .domain([ - this.maxAlt * 1.1 + - Math.abs(this.waterlevel - this.refWaterlevel) / 100, + this.maxAlt * 1.1 + (this.waterlevel - this.refWaterlevel) / 100, -(this.maxAlt * 0.1) ]) .rangeRound([height, 0]); @@ -538,8 +537,7 @@ .scaleLinear() .domain([ this.waterlevel - - (this.maxAlt * 100 + - Math.abs(this.waterlevel - this.refWaterlevel)), + (this.maxAlt * 100 + (this.waterlevel - this.refWaterlevel)), this.waterlevel + this.maxAlt * 0.1 * 100 ]) .rangeRound([height, 0]);