mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-18 14:45:12 +02:00
Fixing draw mode bugs
Disabling interactive draw undo for now. I know how to fix it but it's a bit tricky. So undo will just drop you out to browse mode for the time being. Fixes #477. Fixes #516.
This commit is contained in:
@@ -70,6 +70,27 @@ describe("iD.History", function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe("#pop", function () {
|
||||
it("updates the graph", function () {
|
||||
history.perform(action, "annotation");
|
||||
history.pop();
|
||||
expect(history.undoAnnotation()).to.be.undefined;
|
||||
});
|
||||
|
||||
it("does not push the redo stack", function () {
|
||||
history.perform(action, "annotation");
|
||||
history.pop();
|
||||
expect(history.redoAnnotation()).to.be.undefined;
|
||||
});
|
||||
|
||||
it("emits a change event", function () {
|
||||
history.perform(action);
|
||||
history.on('change', spy);
|
||||
history.pop();
|
||||
expect(spy).to.have.been.calledWith([]);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#undo", function () {
|
||||
it("pops the undo stack", function () {
|
||||
history.perform(action, "annotation");
|
||||
@@ -77,6 +98,13 @@ 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