# HG changeset patch # User Fadi Abbud # Date 1568815441 -7200 # Node ID fe8c331760ae67b88f238c8992f9fe0677c30741 # Parent 0bfecb6beda1aa80aa86462d4e630cd6f8e008b2 client: FWD: correct values for diagramlegend * correct calculations of meter values in case widthlimit is given diff -r 0bfecb6beda1 -r fe8c331760ae client/src/components/fairway/AvailableFairwayDepth.vue --- a/client/src/components/fairway/AvailableFairwayDepth.vue Wed Sep 18 15:44:52 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepth.vue Wed Sep 18 16:04:01 2019 +0200 @@ -186,22 +186,18 @@ legend() { const d = [this.depthlimit1D, this.depthlimit2D].sort(); const w = [this.widthlimit1D, this.widthlimit2D].sort(); - const lowerBound = [d[0], w[0]].filter(x => x).join(", "); - const upperBound = [d[1], w[1]].filter(x => x).join(", "); + const lowerBound = [d[0] / 100, w[0]].filter(x => x).join(", "); + const upperBound = [d[1] / 100, w[1]].filter(x => x).join(", "); let result; if (this.depthlimit1D !== this.depthlimit2D) { result = [ `> LDC`, - `>= ${upperBound / 100} [m]`, - `< ${upperBound / 100} [m]`, - `< ${lowerBound / 100} [m]` + `>= ${upperBound} [m]`, + `< ${upperBound} [m]`, + `< ${lowerBound} [m]` ]; } else { - result = [ - `> LDC`, - `>= ${upperBound / 100} [m]`, - `< ${upperBound / 100} [m]` - ]; + result = [`> LDC`, `>= ${upperBound} [m]`, `< ${upperBound} [m]`]; } return result; }, diff -r 0bfecb6beda1 -r fe8c331760ae client/src/components/fairway/AvailableFairwayDepthLNWL.vue --- a/client/src/components/fairway/AvailableFairwayDepthLNWL.vue Wed Sep 18 15:44:52 2019 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepthLNWL.vue Wed Sep 18 16:04:01 2019 +0200 @@ -185,22 +185,18 @@ legendLNWL() { const d = [this.depthlimit1D, this.depthlimit2D].sort(); const w = [this.widthlimit1D, this.widthlimit2D].sort(); - const lowerBound = [d[0], w[0]].filter(x => x).join(", "); - const upperBound = [d[1], w[1]].filter(x => x).join(", "); + const lowerBound = [d[0] / 100, w[0]].filter(x => x).join(", "); + const upperBound = [d[1] / 100, w[1]].filter(x => x).join(", "); let result; if (this.depthlimit1D !== this.depthlimit2D) { result = [ `> LDC`, - `< ${lowerBound / 100} [m]`, - `< ${upperBound / 100} [m]`, - `>= ${upperBound / 100} [m]` + `< ${lowerBound} [m]`, + `< ${upperBound} [m]`, + `>= ${upperBound} [m]` ]; } else { - result = [ - `> LDC`, - `< ${upperBound / 100} [m]`, - `>= ${upperBound / 100} [m]` - ]; + result = [`> LDC`, `< ${upperBound} [m]`, `>= ${upperBound} [m]`]; } return result; },