Commit ec1b28a
[Web] Fix bottom hitslop (#3644)
## Description
Currently `hitSlop` on web uses `width` instead of `height` to calculate `bottom` property. This is incorrect.
Fixes #3633
## Test plan
Trust our intuition 🤓
<details>
<summary>Tested on the following example:</summary>
```jsx
import React from 'react';
import { StyleSheet, View } from 'react-native';
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
export default function EmptyExample() {
const gesture = Gesture.Pan().hitSlop({ bottom: -20 }).onUpdate(console.log);
return (
<GestureDetector gesture={gesture}>
<View style={styles.box} />
</GestureDetector>
);
}
const styles = StyleSheet.create({
box: {
width: 10,
height: 100,
backgroundColor: 'red',
},
});
```
</details>1 parent 0b4397a commit ec1b28a
1 file changed
Lines changed: 2 additions & 1 deletion
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
| 747 | + | |
748 | 748 | | |
| 749 | + | |
749 | 750 | | |
750 | 751 | | |
751 | 752 | | |
| |||
0 commit comments