Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 6969

Prevent adding change to undo manager history list

$
0
0

@Mickey wrote:

Hello, I have a node that have button panel which is activated/deactivated when user clicks on already selected node. I'm using a data binding to tell node when to show/hide panel according to user actions. Code for this is trivial an looks like:

click: function (e, obj) {
        if (e.targetObject.part.isSelected) {
            let state = e.targetObject.part.data.options;
            e.diagram.model.setDataProperty(e.targetObject.part.data, "options", !state);
        }
   }

I want to this data change is skipped by undo manager because otherwise undo/redo action changes visibility of panel which is not desirable. I tried remove directly from UndoManager.history list last action but object is frozen. So I hope there is a way to prevent that undo manager register this property change as a undoable action.

Best regards

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6969

Trending Articles