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.

Setting document.body.style.zoom messes zoom mouse interaction

See original GitHub issue

Setting document zoom level e.g.:

document.body.style.zoom = 0.8;

messes mouse interaction for zooming. Please check out: https://codepen.io/aykutkilic/pen/bGeZXYp

Other interaction like panning, translating axis, zoom all works normally

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcjohnsoncommented, Nov 18, 2020

@aykutkilic that’s a good point - I think we’re going to leave #5193 as it is just addressing transform, since it’s tricky to handle both attributes within the architecture of that PR. But there is another approach of determining the scaling empirically via getBoundingClientRect on test elements in the corners of the graph that should handle zoom just as well as transform. If anyone is interested in switching to that (and that “anyone” may be us eventually, but not right now) we’d certainly be open to it as a follow-up PR.

0reactions
aykutkiliccommented, Nov 18, 2020

Our apps do not face web and run in CEF.

Read more comments on GitHub >

github_iconTop Results From Across the Web

zoom - CSS: Cascading Style Sheets - MDN Web Docs
The non-standard zoom CSS property can be used to control the magnification level of an element. transform: scale() should be used instead ...
Read more >
Selenium WebDriver zoom in/out page content - Stack Overflow
This will result in zooming in by 300% and will scroll to top. Chrome await driver.executeScript('document.body.style.zoom = "300%"');.
Read more >
How do you zoom a page in Javascript? - Quora
There are many ways to do it,you have to write both ZoomIn and ZoomOut functions for it. below is the working code. function...
Read more >
200: Scroll to Zoom - CSS-Tricks
I just happened to be looking at a neat little SVG warping tool that had a feature where my mouse scroll wheel (or...
Read more >
Unable to click on object after browser resize zoom out
executeJavaScript("document.body.style.zoom='60%'", null). My advice: Stick to the default zoom level and don't alter the AUT from your test ...
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