Use mouse wheel for page zoom, click and drag to pan the page
P粉3087835852024-03-26 14:11:27
0
1
356
How to use the mouse wheel to create scrolling and panning effects for the entire page? Basically just like any 2D editor, scroll to zoom and click and drag to pan, but for the entire body.
If you don't know where to start, you'll quickly hit a wall because knowing where to start is the easy part. Here's a rough guide:
wheel
event (Learn how](https://stackoverflow.com/a/51276012/104380 a>))zoom
value, calculate the increment of wheel events and update %