question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to always zoom from center?

See original GitHub issue

In examples you have provided, I’ve noticed that (percieved?) transform-origin for the zoom is based of current cursor position. Would it be possible to force the transform-origin to always be set on center center?

I’ve tried to look around your code, even play with some variables, but unfortunately I wasn’t able to find where this is determined. Thanks in advance!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
rmbarcommented, Oct 21, 2018

+1 for a mode where zoom in/out does not care where the moues is positioned on the screen.

2reactions
anvakacommented, Nov 17, 2019

Added in v8.5.0. To fix panzoom to the middle of the screen, use the following code:

let panzoomInstance = panzoom(element, {
  transformOrigin: {x: 0.5, y: 0.5}
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make Magnifier always zoom center of the screen?
I understand that you are looking into magnifier always zoom center of the screen. It looks like there is no exact registry setting...
Read more >
Adjusting your video layout during a virtual meeting
Start or join a meeting. By default, the Zoom mobile app displays the Active Speaker View. · Swipe left from the active speaker...
Read more >
Keep a div in the center of the page on zoom - Stack Overflow
I have an image and text in a div and I'm trying to keep it in the center of the page when I...
Read more >
Why am I always zooming at center of grid?
If you mean your 3D Cursor, then the shortcut is Alt + Home . Otherwise, if you want to zoom into your mouse,...
Read more >
Zoom in on the iPhone screen - Apple Support
Go to Settings > Accessibility > Zoom, then turn on Zoom. · Adjust any of the following: · If you use iPhone with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found