Skip to content

Commit

Permalink
Update sheet to work with newer undojs interface
Browse files Browse the repository at this point in the history
  • Loading branch information
robertleeplummerjr authored and robertleeplummerjr committed Aug 28, 2014
1 parent 8ccb841 commit 37bebf6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
9 changes: 8 additions & 1 deletion Sheet/sheet.js
Expand Up @@ -7777,7 +7777,14 @@ $.sheet = {
before.id = id;
after.id = id;

jS.undo.manager.register(u, jS.undo.removeCells, [before, id], 'Remove Cells', u, jS.undo.createCells, [after, null, id], 'Create Cells');
jS.undo.manager.add({
undo: function() {
jS.undo.removeCells(before, id);
},
redo: function() {
jS.undo.createCells(after, null, id);
}
});

if (id != jS.undo.id || !fn) {
jS.calcLast = new Date();
Expand Down
9 changes: 8 additions & 1 deletion jquery.sheet.js
Expand Up @@ -9272,7 +9272,14 @@ $.sheet = {
before.id = id;
after.id = id;

jS.undo.manager.register(u, jS.undo.removeCells, [before, id], 'Remove Cells', u, jS.undo.createCells, [after, null, id], 'Create Cells');
jS.undo.manager.add({
undo: function() {
jS.undo.removeCells(before, id);
},
redo: function() {
jS.undo.createCells(after, null, id);
}
});

if (id != jS.undo.id || !fn) {
jS.calcLast = new Date();
Expand Down
2 changes: 1 addition & 1 deletion jquery.sheet.min.js

Large diffs are not rendered by default.

0 comments on commit 37bebf6

Please sign in to comment.