Mercurial > gemma
diff client/src/components/fairway/AvailableFairwayDepth.vue @ 5475:791a372553a0
Client:FWA: Fix setting request parameters and legend
* Set default limit-width values (80m, 150m) for bottlenecks that limited
by width
* Fix condition of generating the legend
* Fix setting the boundaries of the legend
* Convert limit-width values to "cm" for the request.
author | Fadi Abbud <fadi.abbud@intevation.de> |
---|---|
date | Mon, 16 Aug 2021 15:55:57 +0200 |
parents | 6b054b91d9b2 |
children | 89b6978afc58 |
line wrap: on
line diff
--- a/client/src/components/fairway/AvailableFairwayDepth.vue Mon Aug 09 22:08:01 2021 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepth.vue Mon Aug 16 15:55:57 2021 +0200 @@ -197,12 +197,15 @@ "widthlimit2" ]), legend() { - const d = [this.depthlimit1D, this.depthlimit2D].sort(); - const w = [this.widthlimit1D, this.widthlimit2D].sort(); + const d = [this.depthlimit1D, this.depthlimit2D].sort((a, b) => a - b); + const w = [this.widthlimit1D, this.widthlimit2D].sort((a, b) => a - b); 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) { + if ( + this.depthlimit1D !== this.depthlimit2D || + this.widthlimit1 !== this.widthlimit2 + ) { result = [ `> LDC`, `>= ${upperBound} [m]`,