https://linear.app/comm/issue/ENG-8150/convert-fullscreenviewmodal-to-reanimated-2-syntax
Migrated doubleTapUpdate, getHorizontalPanSpace, getVerticalPanSpace methods.
On double tap:
- if the current scale is > 1 then animate scale to 1 and recenter the image with timing animation
- otherwise animate scale to 3 and recenter the image with timing animation
The math was basically copied from the original implementation, just rewritten from v1 (nodes) to v2 api (worklets).
There is one more thing: in the original implementation there is logic to stop the animation if a gesture is active. In the methods migrated in the next diffs (backdropOpacity, recenter, fling) there are also a couple of places that stop the animations when gesture is active. V2 has function cancelAnimation that cancels any animation on a shared value, so I'm going to use it later in a separate diff to cancel all animations from double tap, recenter etc.
Depends on D14304