Drag doesn't appear to work with touch input on iOS
jimjam-slam opened this issue ยท 5 comments
The new draggable Globe view in Bertin is really nice! I'm having trouble dragging it in browsers on iOS, though.
I can see Brrtin's drag behaviour defined down the bottom of rotate.js
using d3-drag
. The d3-drag
docs suggest that the d3-drag "drag" event covers both mousemove and touchmove on the native end, so in theory this should work for both touch and mouse input. I'm not sure why it doesn't seem to on iOS (at least for me!) ๐ค
I've tested on Safari and Firefox on iOS (although ofc all browsers on iOS currently use the Safari rendering engine). I haven't had any problems with desktop browsers using a mouse. I haven't had an opportunity to test on a non-iOS touch device, though (eg. an Android phone).
Ok. I didn't test it. Would it be possible to define precisely the problem and post an issue?
to support touch you can probably just replace d3.pointer(event, this)
by d3.pointers(event, this)[0]
see https://observablehq.com/@d3/multitouch for details
Ok. I didn't test it. Would it be possible to define precisely the problem and post an issue?
Sorry! When I say "I'm having trouble dragging it," I mean that the globe does not respond to dragging via touch on iOS devices. Are there other details that would be helpful to illustrate the problem? (I feel like a video would be unhelpful unless there's a way to show touch on iOS ๐ )
@Fil's suggestion makes sense to me!
I tried updating to 1.8.2 in the globe view notebook and it works fantastically ๐ Thanks a bunch!