react-native-gesture-handler
Advanced tools
Comparing version 1.5.0 to 1.5.1
@@ -0,2 +1,6 @@ | ||
import { View, ScrollView } from 'react-native' | ||
export default { | ||
ScrollView, | ||
PanGestureHandler: View, | ||
attachGestureHandler: () => {}, | ||
@@ -3,0 +7,0 @@ createGestureHandler: () => {}, |
@@ -34,2 +34,11 @@ import React from 'react'; | ||
}; | ||
// In newer versions of RN the `genericDirectEventTypes` is located in the object | ||
// returned by UIManager.getConstants(), we need to add it there as well to make | ||
// it compatible with RN 61+ | ||
if (UIManager.getConstants) { | ||
UIManager.getConstants().genericDirectEventTypes = { | ||
...UIManager.getConstants().genericDirectEventTypes, | ||
...customGHEventsConfig, | ||
}; | ||
} | ||
@@ -40,3 +49,2 @@ // Wrap JS responder calls and notify gesture handler manager | ||
clearJSResponder: oldClearJSResponder = () => {}, | ||
getConstants: oldGetConstants = () => ({}), | ||
} = UIManager; | ||
@@ -51,14 +59,2 @@ UIManager.setJSResponder = (tag, blockNativeResponder) => { | ||
}; | ||
// We also add GH specific events to the constants object returned by | ||
// UIManager.getConstants to make it work with the newest version of RN | ||
UIManager.getConstants = () => { | ||
const constants = oldGetConstants(); | ||
return { | ||
...constants, | ||
genericDirectEventTypes: { | ||
...constants.genericDirectEventTypes, | ||
...customGHEventsConfig, | ||
}, | ||
}; | ||
}; | ||
@@ -65,0 +61,0 @@ let handlerTag = 1; |
@@ -310,3 +310,3 @@ // @flow | ||
if (fromValue !== undefined) { | ||
if (fromValue != null) { | ||
let nextFramePosition = fromValue; | ||
@@ -455,3 +455,5 @@ if (this.props.useNativeAnimations) { | ||
]} | ||
importantForAccessibility={this._drawerShown ? "no-hide-descendants" : "yes"}> | ||
importantForAccessibility={ | ||
this._drawerShown ? 'no-hide-descendants' : 'yes' | ||
}> | ||
{typeof this.props.children === 'function' | ||
@@ -458,0 +460,0 @@ ? this.props.children(this._openValue) |
{ | ||
"name": "react-native-gesture-handler", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Experimental implementation of a new declarative API for gesture handling in react-native", | ||
@@ -78,3 +78,3 @@ "scripts": { | ||
"babel-preset-react-native": "1.9.0", | ||
"flow-bin": "^0.56.0", | ||
"flow-bin": "^0.98.0", | ||
"husky": "^0.14.3", | ||
@@ -81,0 +81,0 @@ "jest": "^24.7.1", |
Sorry, the diff of this file is not supported yet
425290
4114