Merge pull request #3531 from SergioCrisostomo/fix-3468

Correct values passed to checkLimits method
This commit is contained in:
Aresn 2018-05-03 09:47:16 +08:00 committed by GitHub
commit af615212f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -332,8 +332,8 @@
changeButtonPosition (newPos, forceType) {
const type = forceType || this.pointerDown;
const index = type === 'min' ? 0 : 1;
if (type === 'min') newPos = this.checkLimits([newPos, this.maxPosition])[0];
else newPos = this.checkLimits([this.minPosition, newPos])[1];
if (type === 'min') newPos = this.checkLimits([newPos, this.max])[0];
else newPos = this.checkLimits([this.min, newPos])[1];
const modulus = this.handleDecimal(newPos,this.step);
const value = this.currentValue;