UndoManager's Operations

Discussion created by mhoover12 on Jun 30, 2011
Latest reply on Jul 5, 2011 by mhoover12
As per the API:

Adds an undo operation to the stack and clears the redo stack.
Return value: none
Input Parameters:
<Operation> operation Required An operation to add to the stack.

Code snippets:

  var operation = new esri.dijit.editing.Delete({
    featureLayer: layer,
    deletedGraphics: [feature]

I am curious how an Operation is defined.  It is not a part of the API, and considering the wide variety of actions I would like to include, I have generally no idea how to go about defining an Operation to add to my stack, other than the ones included in the API for UndoManager and in the one Sample that uses it.

Has anyone implemented this?  Any insight you could provide would be great.  Our highest priority for this involves drawing graphics on the map, changing the color/scale/rotation/etc. of those graphics, deleting said graphics, etc...