diff --git a/src/param/param-values.ts b/src/param/param-values.ts index d68778290ed11847f421490a92720810bb3a0c85..266cb51a15ae48ee2491a55ae89b8991cf409825 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; }