From ace340f9d37efdd11cfa7c898848782c0e876249 Mon Sep 17 00:00:00 2001 From: Elliott Kember Date: Thu, 7 Nov 2024 14:04:21 +1300 Subject: [PATCH] getThumb fix for vertical sliders --- src/index.tsx | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index d288b65..3f5a8b1 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -392,16 +392,11 @@ export class Slider extends PureComponent { }; _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;