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

[Android] Reset sMatrixDecompositionContext before applying transformations #25438

Closed
wants to merge 1 commit into from

Commits on Jun 30, 2019

  1. Reset sMatrixDecompositionContext before applying transformations

    Prior to this commit React Native on Android was not properly setting
    the transform's scale properly correctly when setting it to 0. In order
    to properly set one would need to use values close to 0, like 0.0001.
    This was happing due to BaseViewManager sharing sMatrixDecompositionContext
    across all views in a React Native app.
    In some cases the decomposeMatrix() method from the MatrixMathHelper would
    return early and not set any new values in sMatrixDecompositionContext
    (this is, the new transform values) and
    since this is a shared object the BaseViewManager would set the transform values
    from the a previous transform.
    
    In order to prevent this issue, before setting the new transform values
    always reset the sMatrixDecompositionContext values.
    cabelitos committed Jun 30, 2019
    Copy the full SHA
    2249b9f View commit details
    Browse the repository at this point in the history