Make Animated.SpringAnimation JS compatible with Expo SDK 22 (CRNA) native code (#16513)

This commit is contained in:
Adam Miskiewicz
2017-10-25 15:12:26 +02:00
committed by Mike Grabowski
parent ee68b113ff
commit 84241fbcdc
2 changed files with 9 additions and 0 deletions
@@ -595,11 +595,14 @@ describe('Native Animated', () => {
{
type: 'spring',
friction: 16,
damping: 16,
mass: 1,
initialVelocity: 0,
overshootClamping: false,
restDisplacementThreshold: 0.001,
restSpeedThreshold: 0.001,
tension: 679.08,
stiffness: 679.08,
toValue: 10,
iterations: 1,
},
@@ -613,11 +616,14 @@ describe('Native Animated', () => {
{
type: 'spring',
friction: 23.05223140901191,
damping: 23.05223140901191,
mass: 1,
initialVelocity: 0,
overshootClamping: false,
restDisplacementThreshold: 0.001,
restSpeedThreshold: 0.001,
tension: 299.61882352941177,
stiffness: 299.61882352941177,
toValue: 10,
iterations: 1,
},
@@ -120,6 +120,9 @@ class SpringAnimation extends Animation {
restSpeedThreshold: this._restSpeedThreshold,
tension: this._tension,
friction: this._friction,
stiffness: this._tension,
damping: this._friction,
mass: 1,
initialVelocity: withDefault(this._initialVelocity, this._lastVelocity),
toValue: this._toValue,
iterations: this.__iterations,