# HG changeset patch # User Fadi Abbud # Date 1629122157 -7200 # Node ID 791a372553a055e5c82e1427bfa5510206fd8902 # Parent d71ebe576c7655684aa22c308b738db313be24c3 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. diff -r d71ebe576c76 -r 791a372553a0 client/src/components/fairway/AvailableFairwayDepth.vue --- 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]`, diff -r d71ebe576c76 -r 791a372553a0 client/src/components/fairway/AvailableFairwayDepthDialogue.vue --- a/client/src/components/fairway/AvailableFairwayDepthDialogue.vue Mon Aug 09 22:08:01 2021 +0200 +++ b/client/src/components/fairway/AvailableFairwayDepthDialogue.vue Mon Aug 16 15:55:57 2021 +0200 @@ -623,6 +623,12 @@ this.depthLimit2 = 2.5; } }, + widthLimitVisible() { + if (this.widthLimitVisible) { + this.widthLimit1 = 80; + this.widthLimit2 = 150; + } + }, selectedBottleneck() { this.type = this.$options.BOTTLENECK; this.setSelectedBottleneck(); @@ -757,8 +763,8 @@ type: this.type, depthLimit1: this.depthlimit1, depthLimit2: this.depthlimit2, - widthLimit1: this.widthLimit1, - widthLimit2: this.widthLimit2, + widthLimit1: Math.round(this.widthLimit1 * 100), + widthLimit2: Math.round(this.widthLimit2 * 100), limitingFactor: this.limitingFactor }) .then(() => { @@ -805,8 +811,8 @@ type: this.type, depthLimit1: this.depthlimit1, depthLimit2: this.depthlimit2, - widthLimit1: this.widthLimit1, - widthLimit2: this.widthLimit2, + widthLimit1: Math.round(this.widthLimit1 * 100), + widthLimit2: Math.round(this.widthLimit2 * 100), limitingFactor: this.limitingFactor }) .then(() => { diff -r d71ebe576c76 -r 791a372553a0 client/src/store/fairwayavailability.js --- a/client/src/store/fairwayavailability.js Mon Aug 09 22:08:01 2021 +0200 +++ b/client/src/store/fairwayavailability.js Mon Aug 16 15:55:57 2021 +0200 @@ -70,8 +70,8 @@ limitingFactor: null, depthlimit1: 230, depthlimit2: 250, - widthlimit1: null, - widthlimit2: null, + widthlimit1: 80, + widthlimit2: 150, csv: null, fwData: null, fwLNWLData: null,