Fixed issue 691 by making resetUndoStack public through svgCanvas.undoMgr

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1750 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2010-09-24 16:44:20 +00:00
parent c363097f50
commit 73b2b93bab
1 changed files with 10 additions and 10 deletions

View File

@ -950,22 +950,22 @@ var BatchCommand = this.undoCmd.batch = function(text) {
this.isEmpty = function() { return this.stack.length == 0; };
}
// Set scope for these undo functions
var resetUndoStack, addCommandToHistory;
// Set scope for addCommandToHistory
var addCommandToHistory;
// Undo/redo stack related functions
(function(c) {
var undoStackPointer = 0,
undoStack = [];
// Function: resetUndoStack
// Resets the undo stack, effectively clearing the undo/redo history
resetUndoStack = function() {
undoStack = [];
undoStackPointer = 0;
};
c.undoMgr = {
// Function: undoMgr.resetUndoStack
// Resets the undo stack, effectively clearing the undo/redo history
resetUndoStack: function() {
undoStack = [];
undoStackPointer = 0;
},
// Function: undoMgr.getUndoStackSize
// Returns:
// Integer with the current size of the undo history stack
@ -9086,7 +9086,7 @@ this.clear = function() {
canvas.createLayer("Layer 1");
// clear the undo stack
resetUndoStack();
canvas.undoMgr.resetUndoStack();
// reset the selector manager
selectorManager.initGroup();
// reset the rubber band box