-
Notifications
You must be signed in to change notification settings - Fork 22.9k
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
d3.mouse return incorrect position when browser zoomed. #668
Comments
Last time I looked, the bug is in browsers' implementation of getScreenCTM, and I'm not sure this is fixable in JavaScript. |
Thanks a lot for your reply so fast! I've tried many times, but failed. I'm such a freshman in JavaScript. ><~ |
See #766 |
Is the issue supposed to be fixed in d3.v3 ? I am still experiencing the same problem under Chrome. |
No, this is a browser bug, and there is no explicit workaround in D3. |
As far as I can tell, this has been fixed in current browsers. However, it is related to d3/d3-selection#67. |
d3.mouse performs a little strange in mouse events. When the svg did not on the left of screen, if I use the zoom tool of browser, it can’t recognize the location of mouse correctly. It happens in IE9, chrome, safari, opera, only in firefox it works well.
I made a simple demo of that: http://walkpie.cnodejs.net/
You can review the demo and download the code in the demo page.
The core part of the demo:
The text was updated successfully, but these errors were encountered: