10000 Add support for zooming with multiple fingers 🤘 by willnguyen1312 · Pull Request #351 · willnguyen1312/zoom-image · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for zooming with multiple fingers 🤘 #351

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

Closed
wants to merge 1 commit into from

Conversation

willnguyen1312
Copy link
Owner

No description provided.

Copy link

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

Copy link
netlify bot commented Jun 7, 2025

Deploy Preview for zoom-image-library ready!

Name Link
🔨 Latest commit 5a7c286
🔍 Latest deploy log https://app.netlify.com/projects/zoom-image-library/deploys/6844aa045a513c0008a51620
😎 Deploy Preview https://deploy-preview-351--zoom-image-library.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 project configuration.

@willnguyen1312 willnguyen1312 requested a review from Copilot June 7, 2025 21:08
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds support for zooming with more than two touch points by handling any multi-finger touch events and updating package sizes and version metadata.

  • Expand touch handling from exactly two touches to any multi-touch scenario, using the first two touch points for pinch calculations
  • Update reported gzipped sizes in size.json for several frameworks and fix ordering in the Angular section
  • Bump the minor version in the changeset to reflect the new feature

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
size.json Updated gzipped size values and adjusted key ordering for Angular
packages/core/src/createZoomImageWheel.ts Changed pinch logic to handle more than two touches, slicing first two
.changeset/hungry-friends-scream.md Bumped minor version and added feature description
Comments suppressed due to low confidence (3)

packages/core/src/createZoomImageWheel.ts:344

  • [nitpick] You’re calling event.preventDefault() here for single-touch and again in the multi-touch block—consider consolidating these preventDefault calls or clearly separating their conditions to improve readability.
if (finalOptions.shouldZoomOnSingleTouch()) event.preventDefault()

packages/core/src/createZoomImageWheel.ts:345

  • [nitpick] Add a comment explaining that you only use the first two touch points for pinch calculations when more than two fingers are down, so future readers understand the slice behavior.
if (event.touches.length > 1) {

packages/core/src/createZoomImageWheel.ts:343

  • We should add unit or integration tests to verify the new multi-touch behavior (e.g., three or more touches where only the first two are used) to prevent regressions.
function _handleTouchMove(event: TouchEvent) {

Comment on lines 48 to +50
"ZoomImageHoverService": "4.07 KB",
"ZoomImageMoveService": "4.07 KB",
"ZoomImageWheelService": "4.06 KB"
"ZoomImageClickService": "4.07 KB",
Copy link
Preview
Copilot AI Jun 7, 2025

Choose a reason for hiding this comment

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

[nitpick] The key order in the Angular section now is Hover, Move, Click, Wheel—consider reordering to Click, Hover, Move, Wheel (or alphabetically) for consistency with other sections.

Copilot uses AI. Check for mistakes.

@willnguyen1312 willnguyen1312 deleted the support-zooming-on-multiple-fingers branch June 7, 2025 21:17
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
0