-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix duration of fading transition (#6174)
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> ## Summary Now the fading transition executes for `2*duration` miliseconds. We should divide the duration by 2 to fix it, the same way it done for the following transitions: https://github.com/software-mansion/react-native-reanimated/blob/82d1d9582d96b463ab95d6ba9b8c1c20e7aa867b/packages/react-native-reanimated/src/layoutReanimation/defaultTransitions/JumpingTransition.ts#L33 https://github.com/software-mansion/react-native-reanimated/blob/82d1d9582d96b463ab95d6ba9b8c1c20e7aa867b/packages/react-native-reanimated/src/layoutReanimation/defaultTransitions/SequencedTransition.ts#L44 <!-- Explain the motivation for this PR. Include "Fixes #<number>" if applicable. --> Also I rename the variables that hold half of the duration and are named "duration" into "halfDuration", as it was suggested during the review ## Test plan Tests are in this PR: #6168 <!-- Provide a minimal but complete code snippet that can be used to test out this change along with instructions how to run it and a description of the expected behavior. -->
- Loading branch information
Showing
3 changed files
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters