Fixed #119 - Range slider goes out of bounds

pull/132/head
cagataycivici 2019-12-23 11:42:11 +03:00
parent b3f65f94a5
commit 5d30c0abec
1 changed files with 3 additions and 3 deletions

View File

@ -96,18 +96,18 @@ export default {
if (this.handleIndex == 0) { if (this.handleIndex == 0) {
if (newValue < this.min) if (newValue < this.min)
newValue = this.min; newValue = this.min;
else if (value > this.value[1]) else if (newValue >= this.value[1])
newValue = this.value[1]; newValue = this.value[1];
} }
else { else {
if (newValue > this.max) if (newValue > this.max)
newValue = this.max; newValue = this.max;
else if (newValue < this.value[0]) else if (newValue <= this.value[0])
newValue = this.value[0]; newValue = this.value[0];
} }
modelValue = [...this.value]; modelValue = [...this.value];
modelValue[this.handleIndex] = Math.floor(value); modelValue[this.handleIndex] = Math.floor(newValue);
} }
else { else {
if (newValue < this.min) if (newValue < this.min)