openstreetmap / iD

🆔 The easy-to-use OpenStreetMap editor in JavaScript.
https://www.openstreetmap.org/edit?editor=id
ISC License
3.37k stars 1.21k forks source link

Momentum map panning on touchscreens #7815

Open quincylvania opened 4 years ago

quincylvania commented 4 years ago

Touchscreen users are used to maps continuing to move after flicking them. iD feels a bit clunky when it doesn't do this. It looks like touch browsers provide this functionality for free by continuing to send "move" events after the "up" event, we just need iD to respond to this.

bhousel commented 4 years ago

Cool, yeah the word for this is "inertia".

It's a long-requested feature in d3-zoom: https://github.com/d3/d3-zoom/issues/67 https://github.com/d3/d3-drag/issues/27

There is this fork that seems to support some inertial panning/zooming: https://github.com/Fil/d3-inertia