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: limit pinch scale to minimum 0.5 #1740

Merged
merged 1 commit into from
Feb 15, 2023

Conversation

cheeaun
Copy link
Contributor

@cheeaun cheeaun commented Feb 13, 2023

I saw this zoom bug and it's also mentioned here: #1620 (comment)

Before:

  • On desktop, use pinch gesture on touchpad
  • Zoom out of the image → Image scaled down
  • Further pinching makes the scale to go negative thus flipping the image up-side-down
pinch-scale-bug-before.mp4

After:

  • Prevent the scale from becoming negative.
  • I figured that might as well make the limit 0.5 instead of zero? I can't think of a reason for anyone to zoom out so much 😅
pinch-scale-bug-after.mp4

Tested on Chrome v109.0.5414.119 (Official Build) (arm64) and Edge v109.0.1518.78 (Official build) (arm64) on MacOS Ventura 13.2.

@stackblitz
Copy link

stackblitz bot commented Feb 13, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link

netlify bot commented Feb 13, 2023

Deploy Preview for elk-docs canceled.

Name Link
🔨 Latest commit 557ac57
🔍 Latest deploy log https://app.netlify.com/sites/elk-docs/deploys/63e9b2c51c74e50007d1b96f

@netlify
Copy link

netlify bot commented Feb 13, 2023

Deploy Preview for elk-zone ready!

Name Link
🔨 Latest commit 557ac57
🔍 Latest deploy log https://app.netlify.com/sites/elk-zone/deploys/63e9b2c5f3f6f30008e8dd3a
😎 Deploy Preview https://deploy-preview-1740--elk-zone.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much Chee! ❤️

@patak-dev patak-dev merged commit 769b848 into elk-zone:main Feb 15, 2023
emanuelpina pushed a commit to emanuelpina/elk that referenced this pull request Feb 18, 2023
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.

2 participants