You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using d3 with cordova packaging my code into a webview for iOS/Android.
I've found a bug in where D3 doesn't fire touchend or touchcancel, so if one finger is removed, it seems like it is in touch. So the next started touch makes it a multi-touch. I made a change to zoom.js and it fixed the error.
The change is in the touchStarted function in d3-zoom/src/zoom.js file and it fixes it for 2 touches.
if(!g.touch0)g.touch0=p,started=true;
This:
if (!g.touch0 || (event.touches.length == 1 && touches.length == 1)) g.touch0 = p, started = true;
I have a d3 & Ionic project that can be found on Github with project setup instructions here that shows the behavior after zooming.
I'm attempting to re-create the the issue here, but it's still a work in progress to reproduce.
The text was updated successfully, but these errors were encountered:
@mbostock Yes it seems to be related. I'm going to reproduce the behavior outside of the mobile environment. The code fix I placed above to zoom.js is working for me now, but i'm not sure if you'd accept a pull request without a working example inside of the browser that show that behavior.
I'm using d3 with cordova packaging my code into a webview for iOS/Android.
I've found a bug in where D3 doesn't fire touchend or touchcancel, so if one finger is removed, it seems like it is in touch. So the next started touch makes it a multi-touch. I made a change to
zoom.js
and it fixed the error.The change is in the
touchStarted
function ind3-zoom/src/zoom.js
file and it fixes it for 2 touches.This:
I have a d3 & Ionic project that can be found on
Github
with project setup instructions here that shows the behavior after zooming.I'm attempting to re-create the the issue here, but it's still a work in progress to reproduce.
The text was updated successfully, but these errors were encountered: