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

fix: support pinch-to-zoom behavior #474

Merged
merged 1 commit into from
Mar 26, 2024
Merged

fix: support pinch-to-zoom behavior #474

merged 1 commit into from
Mar 26, 2024

Conversation

rpearce
Copy link
Owner

@rpearce rpearce commented Mar 25, 2024

Description

In theory, this fixes #436, and is a response to #472, but I'm not opposed to having that as an option, anyway.

The goal with this work is to allow users to pinch-to-zoom in on RMIZ-zoomed images and pan around without being unzoomed (not a nice experience). Once they return the zoom to the normal browser zoom level, then swiping will close the image.

NOTE: I still need to test this on an Android phone and an iPad.

Testing

  1. Clone the repo and checkout this branch: fix/pinch-zoom
  2. npm i --no-save && npm start
  3. Get your local IP address by running this (should work...)
    ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'
    
  4. On a mobile device in the browser, go to the first IP address above at port 6006; e.g., http://192.168.1.152:6006
  5. Open the "Sidebar" and find the example you want to test
  6. Open the "Canvas" view
  7. Click the 4 arrows pointing in different directions
    imagen
  8. Tap on examples and test pinch-to-zoom behavior alongside single finger swipe-to-scroll behavior

@rpearce rpearce added the bug label Mar 25, 2024
@rpearce rpearce self-assigned this Mar 25, 2024
@rpearce rpearce marked this pull request as ready for review March 25, 2024 02:25
@rpearce rpearce merged commit 06b451f into main Mar 26, 2024
2 checks passed
@rpearce rpearce deleted the fix/pinch-zoom branch March 26, 2024 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve iOS pinch-to-zoom experience
1 participant