From 63fdad62f0bfc03cd575fd9e978c429492d017d6 Mon Sep 17 00:00:00 2001
From: "francois.grand" <francois.grand@irstea.fr>
Date: Mon, 26 Mar 2018 17:39:06 +0200
Subject: [PATCH] =?UTF-8?q?=20#44=20suppression=20de=20certains=20contr?=
 =?UTF-8?q?=C3=B4les=20(trop=20contraignants=20au=20niveau=20de=20l'UI)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/param/param-values.ts | 33 ---------------------------------
 1 file changed, 33 deletions(-)

diff --git a/src/param/param-values.ts b/src/param/param-values.ts
index d6877829..266cb51a 100644
--- a/src/param/param-values.ts
+++ b/src/param/param-values.ts
@@ -213,34 +213,6 @@ export class ParamValues {
 
     public set valueMode(m: ParamValueMode) {
         this._valueMode = m;
-        switch (m) {
-            case ParamValueMode.SINGLE:
-                this._minValue = undefined;
-                this._maxValue = undefined;
-                this._stepValue = undefined;
-                this._valueList = undefined;
-                break;
-
-            case ParamValueMode.LISTE:
-                this._singleValue.undefine();
-                this._minValue = undefined;
-                this._maxValue = undefined;
-                this._stepValue = undefined;
-                break;
-
-            case ParamValueMode.MINMAX:
-                this._singleValue.undefine();
-                this._valueList = undefined;
-                break;
-
-            case ParamValueMode.CALCUL:
-                this._singleValue.undefine();
-                this._minValue = undefined;
-                this._maxValue = undefined;
-                this._stepValue = undefined;
-                this._valueList = undefined;
-                break;
-        }
     }
 
     private checkValueMode(expected: ParamValueMode) {
@@ -249,12 +221,10 @@ export class ParamValues {
     }
 
     public get singleValue() {
-        this.checkValueMode(ParamValueMode.SINGLE);
         return this._singleValue.value;
     }
 
     public get uncheckedValue() {
-        this.checkValueMode(ParamValueMode.SINGLE);
         return this._singleValue.uncheckedValue;
     }
 
@@ -264,12 +234,10 @@ export class ParamValues {
     }
 
     public get isDefined() {
-        this.checkValueMode(ParamValueMode.SINGLE);
         return this._singleValue.isDefined;
     }
 
     public get min() {
-        this.checkValueMode(ParamValueMode.MINMAX);
         return this._minValue;
     }
 
@@ -279,7 +247,6 @@ export class ParamValues {
     }
 
     public get max() {
-        this.checkValueMode(ParamValueMode.MINMAX);
         return this._maxValue;
     }
 
-- 
GitLab