openlayers/openlayers — pull request #927 by adv-isu (2013-04-04 16:16:46+00:00)
Title: Improved touch support for Handler.Path.undo

This is a redo of #512 because I botched that PR. It's a simple tweak to the handler code that is (I think) ready for review.

In OpenLayers.Handler.Path.undo on touch devices, set the current ("mouse location") point to match the *new* last vertex in the linestring. Touch devices have no current mouse position (just a last-tapped position), and it's misleading to leave the current point sitting at the last-tapped position, which is likely the location of the vertex that has just been undone, giving the impression that the vertex is still there.

There's currently no built-in UI for invoking undo on touch devices, but for developers (like me) who are calling into the handler from their code, this fix is helpful.