d3 / d3-zoom

Pan and zoom SVG, HTML or Canvas using mouse or touch input.
https://d3js.org/d3-zoom
ISC License
501 stars 144 forks source link

Fix android zoom bug #224

Closed souljorje closed 3 years ago

souljorje commented 3 years ago

Fixes https://github.com/d3/d3-zoom/issues/175, https://github.com/d3/d3-zoom/issues/195, https://github.com/d3/d3-zoom/issues/172

Fil commented 3 years ago

Thanks! The situation would be clearer if we had a test case somewhere, an a page with the fixed code. I've been trying to reproduce the problem and see if this fixed it, but still no success.

Fil commented 3 years ago

I see some sort of bug on (my daughter's phone) Android with this block : after zooming the page (natively), the chart is frozen (the d3 zoom doesn't work).

However this bug also happens with the patched version of d3-zoom @ this fixed block.

souljorje commented 3 years ago

@Fil yeah, doublechecked, seems like problem is not in this, but still it saves us from unnecessary errors, like here https://github.com/uikit/uikit/issues/3853. I got different problem on OnePlus in Chrome: pinch zoomes whole page with map, and after few zoom and drag tries whole page freezes. And yeah, this patch doesn't help. I tried to roll back to d3-zoom@1 and d3-selection@1, later my coworker will tell test and tell if it helped.

What is model of your daughter's phone?

Fil commented 3 years ago

Huawei P Smart; Android 10.0.0

souljorje commented 3 years ago

@Fil, I've found solution for my issue: https://github.com/d3/d3-zoom/issues/172#issuecomment-716205243, it's not related to this PR, but anyway it's better to merge this PR to avoid errors rain in Android console. Could you reopen this PR?