diff client/src/components/fairway/AvailableFairwayDepthDialogue.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 b5028b98e7c4
children 2b862190aee4
line wrap: on
line diff
--- 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(() => {