Skip to content

Commit 388274b

Browse files
authored
Incubator.Slider - fix gap not equal on both max and min ends (#2634)
1 parent 4969b9c commit 388274b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

demo/src/screens/incubatorScreens/IncubatorSliderScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {renderBooleanOption} from '../ExampleScreenPresenter';
66
const VALUE = 20;
77
const NEGATIVE_VALUE = -30;
88
const MIN = 0;
9-
const MAX = Constants.screenWidth - 40; // horizontal margins 20
9+
const MAX = 350;
1010
const INITIAL_MIN = 30;
1111
const INITIAL_MAX = 270;
1212
const COLOR = Colors.blue30;

src/incubator/Slider/Thumb.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ const Thumb = (props: ThumbProps) => {
6868
// adjust end edge
6969
newX = end.value;
7070
}
71-
if (!secondary && newX < gap ||
72-
secondary && newX > end.value - gap ||
71+
if (!secondary && newX <= gap ||
72+
secondary && newX >= end.value - gap ||
7373
newX < end.value - gap && newX > start.value + gap) {
7474
offset.value = newX;
7575
}

0 commit comments

Comments
 (0)