Use offset adjusted value in ModulusAnimatedNode
Summary: Modulus animation computation should use the value adjusted for offset, not the raw value. See the JS implementation here: https://github.com/facebook/react-native/blob/master/Libraries/Animated/src/AnimatedImplementation.js#L1338 cc ryangomba Closes https://github.com/facebook/react-native/pull/15502 Differential Revision: D5638901 Pulled By: shergin fbshipit-source-id: cbf47bd4082897a969e2e561ec090366884a8349
This commit is contained in:
parent
d0669fc922
commit
fedc002c21
|
@ -31,7 +31,7 @@ import com.facebook.react.bridge.ReadableMap;
|
|||
public void update() {
|
||||
AnimatedNode animatedNode = mNativeAnimatedNodesManager.getNodeById(mInputNode);
|
||||
if (animatedNode != null && animatedNode instanceof ValueAnimatedNode) {
|
||||
mValue = ((ValueAnimatedNode) animatedNode).mValue % mModulus;
|
||||
mValue = ((ValueAnimatedNode) animatedNode).getValue() % mModulus;
|
||||
} else {
|
||||
throw new JSApplicationCausedNativeException("Illegal node ID set as an input for " +
|
||||
"Animated.modulus node");
|
||||
|
|
Loading…
Reference in New Issue