Skip to content

Instantly share code, notes, and snippets.

@bogoslavskiy
Created July 8, 2018 16:55
Show Gist options
  • Save bogoslavskiy/60fb2b489d38b6e9d595b0881cdad945 to your computer and use it in GitHub Desktop.
Save bogoslavskiy/60fb2b489d38b6e9d595b0881cdad945 to your computer and use it in GitHub Desktop.
_onScrollEndDrag = e => {
let velocity = e.nativeEvent.velocity.y;
if(velocity == 0 || (isAndroid() && Math.abs(Math.round(velocity)) <= 2)) {
this.props.animation.handleIntermediateState(this.scrollToOffset);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment