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

Zoom photos #1121

Merged
merged 33 commits into from
Dec 23, 2024
Merged

Zoom photos #1121

merged 33 commits into from
Dec 23, 2024

Conversation

jboolean
Copy link
Owner

@jboolean jboolean commented Dec 21, 2024

Adds ability to zoom in on photos

  • Combines all images (base, high res, color) into a stack to move together
  • Adds @jboolean/react-zoom-pan-pinch library. To support panning and pinching.
  • Adds custom handler for single clicks, so it's easy for desktop users to find this feature with one click
  • Changes other event handlers on the overlay to make other functions like hide/showing the overlay compatible.

Why is the react-zoom-pan-pinch-library forked??

  1. Because I want the overlay in the touch area and to get touch events but not itself be zoomed. I added this feature to the library.
  2. I wanted a function to zoom to a point for single clicks.
  3. The pinch functionality was buggy. I fixed two potential bugs
  4. If it detects two rapid touches, it assumes a double click and did not allow pinching. So you could sometimes only pinch by delaying between fingers.
  5. I observed a bug on Android where Android incorrectly reported event.touches to have 1 touch even after 2 touchstart events. So I added manual touch count tracking. I then stopped observing this bug, so I may have diagnosed the wrong problem and this code maybe could be removed.

There's some stuff here related to yalc which is a linking tool to link to the third party library fork during development. While yalc is not used to include dependencies in the codebase (I published to npm instead) it is used during development of the library.

@jboolean jboolean merged commit c2abe85 into master Dec 23, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant