Skip to content

Commit e4347cf

Browse files
committed
fix: add bigger hitslop
1 parent cf7b47f commit e4347cf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

package/src/components/ProgressControl/WaveProgressBar.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ const WAVEFORM_WIDTH = 2;
4545
const WAVEFORM_GAP = 2;
4646
const WAVE_MAX_HEIGHT = 20;
4747
const WAVE_MIN_HEIGHT = 2;
48+
const DRAG_HIT_SLOP = {
49+
bottom: 12,
50+
left: 12,
51+
right: 12,
52+
top: 12,
53+
};
4854

4955
const clampProgress = (progress: number) => {
5056
'worklet';
@@ -141,6 +147,7 @@ export const WaveProgressBar = React.memo(
141147
const pan = useMemo(
142148
() =>
143149
Gesture.Pan()
150+
.hitSlop(DRAG_HIT_SLOP)
144151
.maxPointers(1)
145152
.onStart(() => {
146153
const nextProgress = clampProgress(visualProgress.value);

0 commit comments

Comments
 (0)