Skip to content

Conversation

@Helias
Copy link

@Helias Helias commented Jun 11, 2025

Changes performed:

  • enabled zoom via mouse wheel and pinching (touchscreen)
  • isZoomOptimization solves the issue about shifting the viewport to the top-left side ( Page shift on zooming #1127 )
  • isWheelZoom allows zoom via Ctrl + mouse wheel
  • isWheelCtrlZoom allows zoom without Ctrl and using only the mouse wheel
  • zoom now supports two-way bindings
  • minZoom sets a minimum value limit for the zoom value
  • maxZoom sets a max value limit for the zoom value
  • I made a ZoomService to manage all the zooming logic system there
  • minor type improvements
  • enablePan enables a "hand tool" mode allowing users to click and drag the PDF

closes #1127, #674, #197
related of #22, #341, #799

I have tested this PR with the following touchscreen devices:

  • IPAD 6th gen, where I encountered a slowness rendering performance issue
  • IPAD 10th gen, no issues
  • laptop ThinkPad P1 Gen 7 (I have tested the mouse wheel + Ctrl too)
  • Redmi Note 13 Pro

This custom version can be used before merging the PR using:

npm install helias/ng2-pdf-viewer#zooming-dist

@Helias Helias changed the title feat: implement zooming via mouse wheel and touchscreen feat: implement zooming via mouse wheel and touchscreen zoom (pinching) Jun 11, 2025
@Helias
Copy link
Author

Helias commented Jul 17, 2025

@VadimDez?

This was referenced Jul 17, 2025
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.

Page shift on zooming

2 participants