Skip to content
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

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

Closed
aykutkilic opened this issue Nov 17, 2020 · 6 comments
Closed

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

aykutkilic opened this issue Nov 17, 2020 · 6 comments

Comments

@aykutkilic
Copy link

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

@nicolaskruchten
Copy link
Contributor

This seems like a duplicate of #888 which we are working on fixing right now actually.

@alexcjohnson
Copy link
Collaborator

zoom isn't currently included in the PR fixing this, though it could be - see #5193 (comment)

@archmoj archmoj added the bug something broken label Nov 17, 2020
@archmoj
Copy link
Contributor

archmoj commented Nov 17, 2020

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user.
https://developer.mozilla.org/en-US/docs/Web/CSS/zoom

cc: @antoinerg

@archmoj archmoj closed this as completed Nov 17, 2020
@archmoj archmoj removed the bug something broken label Nov 17, 2020
@aykutkilic
Copy link
Author

Our apps do not face web and run in CEF.

@alexcjohnson
Copy link
Collaborator

@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.

@gvwilson
Copy link
Contributor

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

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

No branches or pull requests

5 participants