Mercurial > gemma
changeset 4425:fe8c331760ae
client: FWD: correct values for diagramlegend
* correct calculations of meter values in case widthlimit is given
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Wed, 18 Sep 2019 16:04:01 +0200 |
parents | 0bfecb6beda1 |
children | a769e14f4baf |
files | client/src/components/fairway/AvailableFairwayDepth.vue client/src/components/fairway/AvailableFairwayDepthLNWL.vue |
diffstat | 2 files changed, 12 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- 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; },
--- 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; },