mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-01 06:22:39 +08:00
Support for Animated.add
Summary:This change adds suport native animated support for Animated.add. Animated.add lets you declare node that outputs a sum of it input nodes. **Test Plan** Play with the following playground app: https://gist.github.com/39de37faf07480fcd7d1 Run JS tests: `npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js` Run java tests: `buck test ReactAndroid/src/test/java/com/facebook/react/animated` Closes https://github.com/facebook/react-native/pull/6641 Differential Revision: D3195963 fb-gh-sync-id: bb1e1a36821a0e071ad0e7d0fa99ce0d6b088b0a fbshipit-source-id: bb1e1a36821a0e071ad0e7d0fa99ce0d6b088b0a
This commit is contained in:
committed by
Facebook Github Bot 8
parent
64d5da7754
commit
b5375bdc09
@@ -15,11 +15,15 @@ import com.facebook.react.bridge.ReadableMap;
|
||||
* Basic type of animated node that maps directly from {@code Animated.Value(x)} of Animated.js
|
||||
* library.
|
||||
*/
|
||||
class ValueAnimatedNode extends AnimatedNode {
|
||||
/*package*/ class ValueAnimatedNode extends AnimatedNode {
|
||||
|
||||
/*package*/ double mValue = Double.NaN;
|
||||
|
||||
ValueAnimatedNode(ReadableMap config) {
|
||||
public ValueAnimatedNode() {
|
||||
// empty constructor that can be used by subclasses
|
||||
}
|
||||
|
||||
public ValueAnimatedNode(ReadableMap config) {
|
||||
mValue = config.getDouble("value");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user