mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-14 20:33:30 +01:00
Fix undo/redo null input
This commit is contained in:
parent
25e7efd77b
commit
c3855c155a
2 changed files with 2 additions and 4 deletions
|
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue