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-75d572ba1dddmaster
parent
c363097f50
commit
73b2b93bab
|
@ -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
|
||||
c.undoMgr = {
|
||||
// Function: undoMgr.resetUndoStack
|
||||
// Resets the undo stack, effectively clearing the undo/redo history
|
||||
resetUndoStack = function() {
|
||||
resetUndoStack: function() {
|
||||
undoStack = [];
|
||||
undoStackPointer = 0;
|
||||
};
|
||||
},
|
||||
|
||||
c.undoMgr = {
|
||||
// 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
|
||||
|
|
Loading…
Reference in New Issue