Class Index | File Index

Classes


Class UndoManager


Defined in: UndoManager.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
UndoManager(maxStackSize)
Creates a new UndoManager
Method Summary
Method Attributes Method Name and Description
 
addUndo(undoFunc, redoFunc)
Register an undo operation.
 
 
 
redo()
Redoes the last action.
 
Resets this instance of the undo manager.
 
undo()
Undoes the last action.
Event Summary
Event Attributes Event Name and Description
 
Event that is fired when undo or redo state changes.
Class Detail
UndoManager(maxStackSize)
Creates a new UndoManager
Parameters:
{Integer} maxStackSize Optional, Default: 64
Method Detail
addUndo(undoFunc, redoFunc)
Register an undo operation. A call to .undo() will cause the undo function to be executed. If you omit the second argument and the undo function will cause the registration of another undo operation, then this operation will be used as the redo function. If you provide both arguments, a call to addUndo() during an undo() or redo() will have no effect.
Parameters:
{Function} undoFunc
The function that should undo the changes.
{Function} redoFunc Optional
The function that should redo the undone changes.

{Boolean} canRedo()
Returns:
{Boolean} true if redo is possible, false otherwise.

{Boolean} canUndo()
Returns:
{Boolean} true if undo is possible, false otherwise.

redo()
Redoes the last action.

reset()
Resets this instance of the undo manager.

undo()
Undoes the last action.
Event Detail
stateChanged()
Event that is fired when undo or redo state changes.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 18 2011 18:03:15 GMT+0000 (WEST)