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

Strange behavior while using pinch gesture detector or scaling/translating inside item component #1407

Open
2 tasks done
mexysfr opened this issue Oct 31, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@mexysfr
Copy link

mexysfr commented Oct 31, 2024

Current behavior

Hello,

I've noticed a strange behavior when using a pinch gesture detector with Flashlist.

The items in my list are simple: a header, an image and a footer.

The image is wrapped in a <SnapbackZoom> component from this lib, simply responsible for listening on a pinch event and then scaling and translating that image during the pinch.

In a random way, when a first image is zoomed, the size of a second image considered by the Flashlist a little further down the list is for some reason increased.
This behavior persists even when the second image is removed from the viewport.

By reloading the list (reloading the application), the second image returns to its original size, until the first image is zoomed in again.

Expected behavior

When an image is zoomed (scale, translate X, translate Y), the size of the other images in the list should not change.

To Reproduce

A repo with a very simple minimal example to reproduce is available here : https://github.com/mexysfr/pinch-zoom
I've also added a video demonstration of the bug below :
https://github.com/user-attachments/assets/ca71c49a-3fcd-4963-ac33-2a644a435404

Platform:

  • iOS
  • Android
@mexysfr mexysfr added the bug Something isn't working label Oct 31, 2024
@mexysfr mexysfr changed the title Strange behavior while using pinch gesture detector inside item component Strange behavior while using pinch gesture detector or scaling/translating inside item component Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant