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:
Eric Rozell 2017-08-16 00:45:26 -07:00 committed by Facebook Github Bot
parent d0669fc922
commit fedc002c21
1 changed files with 1 additions and 1 deletions

View File

@ -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");