From a3ccd7b698090d074e9132dbe246562e84b60279 Mon Sep 17 00:00:00 2001 From: Keith Grennan Date: Wed, 2 Mar 2016 17:13:16 -0800 Subject: [PATCH] NoTransition scene config causes blank scenes The NoTransition scene config produces an interpolator function with a divide by zero, which can cause scenes to have opacity=NaN when directionAdjustedProgress is set to 1. This bad value is interpreted on Simulator as opacity=1 (bug does not appear) but on my device it shows up as opacity=0 (scene shows briefly and then disappears). The 'constant' type seems more appropriate here. --- Animations.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Animations.js b/Animations.js index fb67e0e42..3b1a207fe 100644 --- a/Animations.js +++ b/Animations.js @@ -4,13 +4,8 @@ import buildStyleInterpolator from 'react-native/Libraries/Utilities/buildStyleI var NoTransition = { opacity: { - from: 1, - to: 1, - min: 1, - max: 1, - type: 'linear', - extrapolate: false, - round: 100, + value: 1.0, + type: 'constant', }, }; @@ -145,4 +140,4 @@ const Animations = { } } -export default Animations; \ No newline at end of file +export default Animations;