Commit 166dbc56150936553af41b0134afb57fd391138e
1 parent
c45f05dd
Correct values passed to checkLimits method
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
src/components/slider/slider.vue
@@ -332,8 +332,8 @@ | @@ -332,8 +332,8 @@ | ||
332 | changeButtonPosition (newPos, forceType) { | 332 | changeButtonPosition (newPos, forceType) { |
333 | const type = forceType || this.pointerDown; | 333 | const type = forceType || this.pointerDown; |
334 | const index = type === 'min' ? 0 : 1; | 334 | const index = type === 'min' ? 0 : 1; |
335 | - if (type === 'min') newPos = this.checkLimits([newPos, this.maxPosition])[0]; | ||
336 | - else newPos = this.checkLimits([this.minPosition, newPos])[1]; | 335 | + if (type === 'min') newPos = this.checkLimits([newPos, this.max])[0]; |
336 | + else newPos = this.checkLimits([this.min, newPos])[1]; | ||
337 | 337 | ||
338 | const modulus = this.handleDecimal(newPos,this.step); | 338 | const modulus = this.handleDecimal(newPos,this.step); |
339 | const value = this.currentValue; | 339 | const value = this.currentValue; |