Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return final animation values to JS when animation completes (#36731) #37782

Closed
wants to merge 1 commit into from

Commits on Jun 8, 2023

  1. return final animation values to JS when animation completes (faceboo…

    …k#37782)
    
    Summary:
    Pull Request resolved: facebook#37782
    
    Pull Request resolved: facebook#36731
    
    When using the native driver for animations that involve layout changes (ie. translateY and other transforms, but not styles such as opacity), because it bypasses Fabric, the new coordinates are not updated so the Pressability responder region/tap target is incorrect
    
    **This diff:**
    - Returning the final values from the native side, at the same place it sets the "finished" flag. This gets sent to JS in `animated/animations/Animation.js`. In this diff I'm passing the value when 'hasFinishedAnimations' is true, but in a follow up diff I will look into other cases such as cancelled animations
    
    Next:
    2. Update the Animated.Value to reflect the new values
    3. Call the onEnd function if there is one set
    4. Pass the new values down for layout calculations and the correct Pressability responder region
    
    Changelog:
    [General][Changed] - return animated values to JS for natively driven animations
    
    Reviewed By: javache
    
    Differential Revision: D44110833
    
    fbshipit-source-id: 8f8b8a6c92ae32a1b12d9b28843d21b2116bb42b
    genkikondo authored and facebook-github-bot committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    5d83bd2 View commit details
    Browse the repository at this point in the history