react-native/Libraries/Animated/src
Krzysztof Magiera 6c80f886ae Fix setValue to work properly on natively driven nodes
Summary:
This change fixes an issue with calling `setValue` for natively driven nodes. As of now an attempt to call this method from JS would trigger an error "Attempting to run JS driven animation on animated". That is because for natively animated nodes we don't allow for `setNativeProps` to be executed and method `_flush` is now responsible for triggering that call. To fix the issue we add extra flag to `_updateValue` method that indicates if we should be "flushing" updated values using `setNativeProps` and we pass an appropriate value depending on the status of the node (native/non-native). Note that in animation callback we always pass `true` - that is because natively driven animations will never call into that callback.

**Test Plan**
Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js`
Closes https://github.com/facebook/react-native/pull/7138

Differential Revision: D3257696

fb-gh-sync-id: 13ec26bc36b56b3208f4279a95532bbe60551087
fbshipit-source-id: 13ec26bc36b56b3208f4279a95532bbe60551087
2016-05-04 02:48:22 -07:00
..
__tests__ Fix setValue to work properly on natively driven nodes 2016-05-04 02:48:22 -07:00
polyfills Initial web implementation 2015-09-22 11:58:37 -07:00
Animated.js Initial web implementation 2015-09-22 11:58:37 -07:00
AnimatedImplementation.js Fix setValue to work properly on natively driven nodes 2016-05-04 02:48:22 -07:00
AnimatedWeb.js Initial web implementation 2015-09-22 11:58:37 -07:00
Easing.js Refactor bezier implementation from bezier-easing library 2016-03-12 14:13:22 -08:00
Interpolation.js Round interpolation for RGB components 2016-04-15 14:51:27 -07:00
NativeAnimatedHelper.js Support for Animated.interpolate 2016-04-23 02:37:28 -07:00
SpringConfig.js Initial web implementation 2015-09-22 11:58:37 -07:00
bezier.js Refactor bezier implementation from bezier-easing library 2016-03-12 14:13:22 -08:00