Skip to content

Commit 5e9ecc2

Browse files
authored
fix the initial value bug
descriptions: wix-incubator#269 (comment)
1 parent 030d0b1 commit 5e9ecc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/InteractableView.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class WrappedAnimatedInteractableView extends Component {
2828
constructor(props) {
2929
super(props);
3030
if (this.props.animatedValueX || this.props.animatedValueY) {
31-
this._animatedEvent = Animated.event(
31+
this._animatedEvent = (event, gestureState) => Animated.event(
3232
[{
3333
nativeEvent: {
3434
x: this.props.animatedValueX,
35-
y: this.props.animatedValueY
35+
y: event.nativeEvent.y > 0 ? this.props.animatedValueY : null
3636
}
3737
}],
3838
{ useNativeDriver: !!this.props.animatedNativeDriver }
39-
);
39+
)(event, gestureState);
4040
}
4141
}
4242

0 commit comments

Comments
 (0)