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

example pan & zoom III doesn't work correctly on android #172

Closed
JamesYFC opened this issue Apr 8, 2019 · 2 comments
Closed

example pan & zoom III doesn't work correctly on android #172

JamesYFC opened this issue Apr 8, 2019 · 2 comments

Comments

@JamesYFC
Copy link

JamesYFC commented Apr 8, 2019

On android (tested with 2 different tablets in chrome browser) If you alternate between touch and dragging in the example demo area to pan the whole view (Pan & Zoom III) and then outside of it to scroll the page, the touch and drag events will not work properly back in the demo area.

Compare this behaviour to Drag & Zoom II, where it works.

The .call(d3.zoom ...) is called on a rect within the <g> in pan & zoom III, whereas in drag & zoom II the zoom behaviour is called on the <svg> parent.

I had the same problem in the project I was working on and calling the zoom behaviour on the <svg> parent instead fixed it too.

@mbostock
Copy link
Member

Strange. I can’t think of why it wouldn’t work, but it seems like a browser bug.

souljorje added a commit to souljorje/d3-zoom that referenced this issue Oct 23, 2020
@souljorje
Copy link

d3-zoom doesn't work properly on Android if zoom is called on <g> element, need to call it on <svg>.
Faced the same problem and tested it on OnePlus 8, Android v10, Chrome and Samsung Galaxy, Android v10, Chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants