Skip to content

Commit ace340f

Browse files
committed
getThumb fix for vertical sliders
1 parent cb80d87 commit ace340f

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/index.tsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,11 @@ export class Slider extends PureComponent<SliderProps, SliderState> {
392392
};
393393
_getThumbLeft = (value: number) => {
394394
const {containerSize, thumbSize} = this.state;
395-
const {vertical} = this.props;
396395

397396
const standardRatio = this._getRatio(value);
398397

399398
const ratio = I18nManager.isRTL ? 1 - standardRatio : standardRatio;
400-
return (
401-
ratio *
402-
((vertical ? containerSize.height : containerSize.width) -
403-
thumbSize.width)
404-
);
399+
return ratio * (containerSize.width - thumbSize.width);
405400
};
406401
_getValue = (gestureState: {dx: number; dy: number}) => {
407402
const {containerSize, thumbSize, values} = this.state;

0 commit comments

Comments
 (0)