Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
5474:d71ebe576c76 | 5475:791a372553a0 |
---|---|
195 "depthlimit2", | 195 "depthlimit2", |
196 "widthlimit1", | 196 "widthlimit1", |
197 "widthlimit2" | 197 "widthlimit2" |
198 ]), | 198 ]), |
199 legend() { | 199 legend() { |
200 const d = [this.depthlimit1D, this.depthlimit2D].sort(); | 200 const d = [this.depthlimit1D, this.depthlimit2D].sort((a, b) => a - b); |
201 const w = [this.widthlimit1D, this.widthlimit2D].sort(); | 201 const w = [this.widthlimit1D, this.widthlimit2D].sort((a, b) => a - b); |
202 const lowerBound = [d[0] / 100, w[0]].filter(x => x).join(", "); | 202 const lowerBound = [d[0] / 100, w[0]].filter(x => x).join(", "); |
203 const upperBound = [d[1] / 100, w[1]].filter(x => x).join(", "); | 203 const upperBound = [d[1] / 100, w[1]].filter(x => x).join(", "); |
204 let result; | 204 let result; |
205 if (this.depthlimit1D !== this.depthlimit2D) { | 205 if ( |
206 this.depthlimit1D !== this.depthlimit2D || | |
207 this.widthlimit1 !== this.widthlimit2 | |
208 ) { | |
206 result = [ | 209 result = [ |
207 `> LDC`, | 210 `> LDC`, |
208 `>= ${upperBound} [m]`, | 211 `>= ${upperBound} [m]`, |
209 `< ${upperBound} [m]`, | 212 `< ${upperBound} [m]`, |
210 `< ${lowerBound} [m]` | 213 `< ${lowerBound} [m]` |