diff --git a/GUI/src/components/controls/CtrlSlider.vue b/GUI/src/components/controls/CtrlSlider.vue index e23a2a9df..419c6e6c3 100644 --- a/GUI/src/components/controls/CtrlSlider.vue +++ b/GUI/src/components/controls/CtrlSlider.vue @@ -5,10 +5,10 @@ {{name}}
- + - +
@@ -66,14 +66,20 @@ export default { putVal(keys.join('.'), value); }, setMin: function (e) { - this.min = parseMath(e.target.value); - this.data = Array.from(Array(101), (_, i) => this.min + (this.max-this.min) / 100 * i); - this.value = this.findNearest(this.data, this.value); + let min = parseMath(e.target.value); + if (min < this.max) { + this.min = min; + this.data = Array.from(Array(101), (_, i) => this.min + (this.max-this.min) / 100 * i); + this.value = this.findNearest(this.data, this.value); + } }, setMax: function (e) { - this.max = parseMath(e.target.value); - this.data = Array.from(Array(101), (_, i) => this.min + (this.max-this.min) / 100 * i); - this.value = this.findNearest(this.data, this.value); + let max = parseMath(e.target.value); + if (max > this.min) { + this.max = max; + this.data = Array.from(Array(101), (_, i) => this.min + (this.max-this.min) / 100 * i); + this.value = this.findNearest(this.data, this.value); + } }, deleteCtrl: function() { // commit a mutation in the store with the relevant information