@haroldtran/react-native-modals 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -152,9 +152,10 @@ export default class DraggableView extends Component<Props> {
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
panResponder = PanResponder.create({
|
|
155
|
+
onStartShouldSetPanResponder: () => this.allowedDirections.length > 0,
|
|
155
156
|
onMoveShouldSetPanResponder: (evt, gestureState) =>
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
this.allowedDirections.length > 0 &&
|
|
158
|
+
(gestureState.dx !== 0 || gestureState.dy !== 0),
|
|
158
159
|
onPanResponderMove: (event: any, gestureState: any) => {
|
|
159
160
|
const isVerticalSwipe = (d: SwipeDirection | null) =>
|
|
160
161
|
["up", "down"].includes(d as string);
|