We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55a662b commit af77a4cCopy full SHA for af77a4c
src/Range.tsx
@@ -276,7 +276,7 @@ class Range extends React.Component<RangeProps, RangeState> {
276
pos = props.reverse ? -pos : pos;
277
const max = maxValue - Math.max(...startBounds);
278
const min = minValue - Math.min(...startBounds);
279
- const ratio = Math.min(Math.max(pos / (this.getSliderLength() / 100), min), max);
+ const ratio = Math.min(Math.max(pos / (this.getSliderLength() / (maxValue - minValue)), min), max);
280
const nextBounds = startBounds.map((v) =>
281
Math.floor(Math.max(Math.min(v + ratio, maxValue), minValue)),
282
);
0 commit comments