Skip to content

Commit f40db69

Browse files
* Bug with non zero min and non 1 step fixed
1 parent b3e8f28 commit f40db69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export const getValueForPosition = (positionInView, containerWidth, thumbWidth,
1717
if (relOffset / relStepUnit >= 0.5) {
1818
relPosition += relStepUnit;
1919
}
20-
return clamp(Math.round(min + relPosition / relStepUnit) * step, min, max);
20+
return clamp(min + Math.round(relPosition / relStepUnit) * step, min, max);
2121
};

0 commit comments

Comments
 (0)