mapbox/easey — pull request #14 by aibram (2012-04-14 04:52:35+00:00)
Title: Drag handler improvements

Several changes are made to mouse dragging:
- cursor changes
- while mouse is down, location under cursor stays the same
- upon release the map continues with its current speed, gradually slowing down

See http://aibram.whatbox.ca/easey

I'm not sure whether having the cursor not "grab onto a certain location" was a deliberate design choice of easey, but it seems more natural and usable to have it this way.

The animation time and pan distance after mouseup should be fairly similar no matter what the animation frame rate is, unlike before when the animation time length was directly proportional to the frame rate. If even higher accuracy would be good, pan distance could be rewritten as a function of time.

Thanks for taking a look