Skip to content

Commit

Permalink
getThumb fix for vertical sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottkember committed Nov 7, 2024
1 parent cb80d87 commit ace340f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -392,16 +392,11 @@ export class Slider extends PureComponent<SliderProps, SliderState> {
};
_getThumbLeft = (value: number) => {
const {containerSize, thumbSize} = this.state;
const {vertical} = this.props;

const standardRatio = this._getRatio(value);

const ratio = I18nManager.isRTL ? 1 - standardRatio : standardRatio;
return (
ratio *
((vertical ? containerSize.height : containerSize.width) -
thumbSize.width)
);
return ratio * (containerSize.width - thumbSize.width);
};
_getValue = (gestureState: {dx: number; dy: number}) => {
const {containerSize, thumbSize, values} = this.state;
Expand Down

0 comments on commit ace340f

Please sign in to comment.