mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
@@ -44,6 +44,7 @@ iD.behavior.DrawWay = function(context, wayId, index, mode, baseGraph) {
|
||||
}
|
||||
|
||||
function undone() {
|
||||
finished = true;
|
||||
context.enter(iD.modes.Browse(context));
|
||||
}
|
||||
|
||||
|
||||
@@ -89,12 +89,6 @@ iD.History = function(context) {
|
||||
undo: function() {
|
||||
var previous = stack[index].graph;
|
||||
|
||||
// Pop to the first annotated state.
|
||||
while (index > 0) {
|
||||
if (stack[index].annotation) break;
|
||||
index--;
|
||||
}
|
||||
|
||||
// Pop to the next annotated state.
|
||||
while (index > 0) {
|
||||
index--;
|
||||
|
||||
@@ -132,13 +132,6 @@ describe("iD.History", function () {
|
||||
expect(history.undoAnnotation()).to.be.undefined;
|
||||
});
|
||||
|
||||
it("pops past unannotated states", function () {
|
||||
history.perform(action, "annotation");
|
||||
history.perform(action);
|
||||
history.undo();
|
||||
expect(history.undoAnnotation()).to.be.undefined;
|
||||
});
|
||||
|
||||
it("pushes the redo stack", function () {
|
||||
history.perform(action, "annotation");
|
||||
history.undo();
|
||||
|
||||
Reference in New Issue
Block a user