From 614bcfaee33741956775c86b3b7154c15a40e004 Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Wed, 12 Sep 2018 16:55:58 -0400 Subject: [PATCH 1/2] Fix black screen during the pop animation when using rn-screens --- src/views/StackView/StackViewCard.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/StackView/StackViewCard.js b/src/views/StackView/StackViewCard.js index c21239b..73aca8a 100644 --- a/src/views/StackView/StackViewCard.js +++ b/src/views/StackView/StackViewCard.js @@ -34,7 +34,7 @@ class Card extends React.Component { const active = position.interpolate({ inputRange: [index, index + 1 - EPS, index + 1], - outputRange: [1, 1, 0], + outputRange: [1, 1, isActive ? 1 : 0], extrapolate: 'clamp', }); From 358ddcfb41319baf967e58466cdea0f97c9d02c9 Mon Sep 17 00:00:00 2001 From: Brent Vatne Date: Fri, 14 Sep 2018 12:30:11 +0200 Subject: [PATCH 2/2] Update StackViewCard.js --- src/views/StackView/StackViewCard.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/views/StackView/StackViewCard.js b/src/views/StackView/StackViewCard.js index 73aca8a..c194c1d 100644 --- a/src/views/StackView/StackViewCard.js +++ b/src/views/StackView/StackViewCard.js @@ -32,9 +32,11 @@ class Card extends React.Component { scene: { index, isActive }, } = this.props; - const active = position.interpolate({ + const active = isActive + ? 1 + : position.interpolate({ inputRange: [index, index + 1 - EPS, index + 1], - outputRange: [1, 1, isActive ? 1 : 0], + outputRange: [1, 1, 0], extrapolate: 'clamp', });