react-range
Advanced tools
Comparing version 1.8.8 to 1.8.9
@@ -431,2 +431,5 @@ "use strict"; | ||
}; | ||
if (props.step === 0) { | ||
throw new Error('"step" property should be a positive number'); | ||
} | ||
_this.numOfMarks = (props.max - props.min) / _this.props.step; | ||
@@ -440,5 +443,2 @@ _this.schdOnMouseMove = utils_1.schd(_this.onMouseMove); | ||
} | ||
if (props.step === 0) { | ||
throw new Error('"step" property should be a positive number'); | ||
} | ||
return _this; | ||
@@ -445,0 +445,0 @@ } |
@@ -388,4 +388,4 @@ "use strict"; | ||
function getThumbDistance(thumbEl, clientX, clientY, direction) { | ||
var _a = thumbEl.getBoundingClientRect(), x = _a.x, y = _a.y, width = _a.width, height = _a.height; | ||
return isVertical(direction) ? Math.abs(clientY - (y + height / 2)) : Math.abs(clientX - (x + width / 2)); | ||
var _a = thumbEl.getBoundingClientRect(), left = _a.left, top = _a.top, width = _a.width, height = _a.height; | ||
return isVertical(direction) ? Math.abs(clientY - (top + height / 2)) : Math.abs(clientX - (left + width / 2)); | ||
} |
{ | ||
"name": "react-range", | ||
"version": "1.8.8", | ||
"version": "1.8.9", | ||
"description": "Range input. Slides in all directions.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
72969