Revmoed logs
This commit is contained in:
parent
b4241d4546
commit
11c42f8ee2
|
@ -389,13 +389,11 @@ History.prototype.addState = function(state) {
|
||||||
++this.index;
|
++this.index;
|
||||||
this.size = this.index + 1;
|
this.size = this.index + 1;
|
||||||
this.states[this.size-1] = state;
|
this.states[this.size-1] = state;
|
||||||
console.log('New state ' + this.index + ' / ' + this.size);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
History.prototype.undo = function() {
|
History.prototype.undo = function() {
|
||||||
if (this.undoable()) {
|
if (this.undoable()) {
|
||||||
this.index--;
|
this.index--;
|
||||||
console.log('New state ' + this.index + ' / ' + this.size);
|
|
||||||
return this.currentState();
|
return this.currentState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -403,7 +401,6 @@ History.prototype.undo = function() {
|
||||||
History.prototype.redo = function() {
|
History.prototype.redo = function() {
|
||||||
if (this.redoable()) {
|
if (this.redoable()) {
|
||||||
this.index++;
|
this.index++;
|
||||||
console.log('New state ' + this.index + ' / ' + this.size);
|
|
||||||
return this.currentState();
|
return this.currentState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue