Fix undo/redo null input

This commit is contained in:
Val Erastov 2015-08-21 19:49:54 -07:00
parent 25e7efd77b
commit c3855c155a
2 changed files with 2 additions and 4 deletions

View file

@ -68,7 +68,6 @@ TCAD.TWO.Viewer = function(canvas) {
this.canvas = canvas;
this.io = new TCAD.IO(this);
this.historyManager = new TCAD.HistoryManager(this);
var viewer = this;
this.retinaPxielRatio = window.devicePixelRatio > 1 ? window.devicePixelRatio : 1;
function updateCanvasSize() {
@ -107,6 +106,7 @@ TCAD.TWO.Viewer = function(canvas) {
this._setupServiceLayer();
this.historyManager = new TCAD.HistoryManager(this);
this.refresh();
};

View file

@ -2,9 +2,7 @@
TCAD.HistoryManager = function(viewer) {
this.viewer = viewer;
this.dmp = new diff_match_patch();
this.historyPointer = -1;
this.diffs = [];
this._counter = 0;
this.init(this.viewer.io.serializeSketch());
};