Events should not be saved in UndoManagers History

Hi Walter,
i don’t have any listeners for events in my code. i just want to save doubleclick transaction in undoManager History. i am doing good for double click.
now i don’t want to save NodeResizing, panelExpanderButton’s click and nodeLocations Move in UndoManagers History (no listeners in my code). can you Please help with this.

I don’t understand what you do want to save in the UndoManager’s history. Normally those must be instances of ChangedEvent. You cannot save InputEvents or DiagramEvents.

When a node is resized, i don’t want it to be saved in UndoManager’s History. is it Possible.

If you don’t want to save any events in the undo manager’s history, you can not enable the UndoManager.isEnabled at all. That property defaults to false.

If you only don’t want to save any side-effects from the operation of the ResizingTool, you can override two methods to temporarily turn on Diagram.skipsUndoManager. You could either define a subclass of ResizingTool and override the methods, or you can just modify the instance of ResizingTool:

$(go.Diagram, . . .,
    { . . .,
      "resizingTool.doActivate": function() {
        this.diagram.skipsUndoManager = true;;
      "resizingTool.doDeactivate": function() {;
        this.diagram.skipsUndoManager = false;

i have disabled the undo manager and when a node is moved it should be saved in the undomanager’s history.

when a node is moved just we have to save in undo managers history and i want to ignore everything else.

If I understand you correctly, you never want any undo/redo state to be recorded except when the DraggingTool is operating?

If so, then try these overrides instead:

$(go.Diagram, . . .,
    { . . .,  // don't set "undoManager.isEnabled" to true,
              // leave at the default, false
      "draggingTool.doActivate": function() {
        this.diagram.undoManager.isEnabled = true;;
      "draggingTool.doDeactivate": function() {;
        this.diagram.undoManager.isEnabled = false;

ThankYou Walter :-)