dillon1000/react
Commit
Browse files Adjust range start/end based on the duration and delay of the animation (#32790)
When different animations in a View Transition have different durations, we shouldn't stretch them out to run the full range of swipe. Because then they wouldn't line up the same way as when played using plain time. This adjusts the range start/end to be what it would've been when played by time. Except since we are playing animations in reverse, the animation-delay is actually applied from the range end and then the duration from there to get closer to the start. Reverse the range if the original animation was reversed. Interestingly, the range it takes can be adjusted by what is in the viewport since if a long duration animation is excluded then everything else adjusts too. I left some todos too. We really should also handle if the original animation has multiple iterations. Currently we only play those once.
Changed paths1 file
First-parent comparisonpackages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…