Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extractOffset to Animated
Summary: `flattenOffset` has proven extremely useful, especially when dealing with pan responders and other gesture based animations, but I've also found a number of use cases for the inverse. This diff introduces `extractOffset`, which sets the offset value to the base value, and resets the base value to zero. A common use case would be to extractOffset onGrant and flattenOffset onRelease. Closes #10721 Differential Revision: D4145744 fbshipit-source-id: dc2aa31652df0b31450556f611db43548180c7dd
- Loading branch information
Showing with 59 additions and 0 deletions.
- +12 −0 Libraries/Animated/src/AnimatedImplementation.js
- +4 −0 Libraries/Animated/src/NativeAnimatedHelper.js
- +1 −0 Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.h
- +6 −0 Libraries/NativeAnimation/Nodes/RCTValueAnimatedNode.m
- +12 −0 Libraries/NativeAnimation/RCTNativeAnimatedModule.m
- +10 −0 ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java
- +9 −0 ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java
- +5 −0 ReactAndroid/src/main/java/com/facebook/react/animated/ValueAnimatedNode.java