Leaflet Partially Editable Polyline - Undo / redo
Click the line to start editing, then drag points, drag a midpoint to insert one, or right-click (or long-press) a point to delete it. The library has no undo of its own: the application records each editing event and replays it in reverse.
(Ctrl/Cmd+Z: undo, Ctrl/Cmd+Shift+Z or Ctrl+Y: redo)

Application data

History (oldest first)