Open Latropos opened 3 days ago
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:
2*duration
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
Also I rename the variables that hold half of the duration and are named "duration" into "halfDuration", as it was suggested during the review
Tests are in this PR: https://github.com/software-mansion/react-native-reanimated/pull/6168
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
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: https://github.com/software-mansion/react-native-reanimated/pull/6168