Skip to content

Commit 43aeefb

Browse files
* Thumbs are not stuck if they are on the same position
* Version changed to 2.0.3
1 parent f40db69 commit 43aeefb

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

helpers.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
export const isLowCloser = (downX, lowPosition, highPosition) => {
2+
if (lowPosition === highPosition) {
3+
return downX < lowPosition;
4+
}
25
const distanceFromLow = Math.abs(downX - lowPosition);
36
const distanceFromHigh = Math.abs(downX - highPosition);
4-
return distanceFromLow <= distanceFromHigh;
7+
return distanceFromLow < distanceFromHigh;
58
};
69

710
export const clamp = (value, min, max) => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rn-range-slider",
3-
"version": "2.0.2",
3+
"version": "2.0.3",
44
"author": "Tigran Sahakyan <mail.of.tigran@gmail.com>",
55
"description": "A highly optimized pure JS implementation of Range Slider for React Native",
66
"homepage": "https://github.com/githuboftigran/rn-range-slider",

0 commit comments

Comments
 (0)