Id: Undo makes map pan to previous edit

Created on 29 Jan 2019  路  8Comments  路  Source: openstreetmap/iD

Imagine you're editing some roads, and following them along from place to place to find something to fix. You make a small edit, change your mind and undo. The map will now pan to the previous place you were editing, which might be miles away. I would expect ID to pan to the place I was doing the undo, not to the place I was editing before that.

usability

Most helpful comment

The undo panning should now fully work as expected.

It does, thank you!

All 8 comments

Just looking at it now and definitely agree that it should just show the undone change, rather than zipping back to the location prior to that.

But what should happen if you click undo again?

Say we drag node A from a to b
Then we drag across the map a few km and edit node B, dragging it from y to z

We press undo and see node B move back to point y. (at the moment it would jump back to node A..)

Now if we press undo again, we zoom back to node A, but should the move have been made back to point a already? Or do we zoom back, wait a few ms and then do the undo, so we can watch the undo happen in real time, rather than just seeing the result of the undo?

@jguthrie100 I am not sure if I follow. Let me try to put it in other words:

  • Current behavior: After undo, the map moves to the previously edited element.
  • Improved behavior: After undo, the map moves to the element on which the undo took place (wherever that is at this moment after the undo).

@tordans I understand that, and it's definitely the way it should be implemented imo, but what should happen if you click undo again though..

Should the previous edit 3km away be undone immediately, so that after panning back the user only sees the undone position (and maybe misses some context about how the undo was)? Or should the map jump to the edit 3km away and _then_ do the undo, so the user can see the change?

@jguthrie100 ah, now I get it, sry :).
Personally, I don't feel this pain. The few times that I am not sure what I just "undid", I just use the re-do and check again. For me, solving the issue Joost described, puts us in a good 80-20 spot :).

I would agree: the little time-lag for the second undo sounds fun, but isn't really necesssary

@quincylvania I just tested this on the Preview-System and it still moved the map weirdly.

Testcase:

  1. Open http://preview.ideditor.com/master/#background=Berlin-2018&disable_features=boundaries&id=n1972201029&map=18.33/52.47277/13.44772
  2. Click an address marker
  3. Pan a bit north, remove a building:part
  4. Undo (keyboard or button)
  5. The map will move back to the previouse place and re-select the address marker

It should stay where it is, IMO.

@tordans Thanks for noting that problem! Turns out iD would select the edited feature after undoing or redoing, thereby panning the map, but only if the feature was a node. It doesn't look like we still need this behavior anywhere so I removed it. The undo panning should now fully work as expected.

The undo panning should now fully work as expected.

It does, thank you!

Was this page helpful?
0 / 5 - 0 ratings