I have some additional data added on the Node without using the transaction manager.
This is the temporary data which i dont want gojs to remember. i mean when user is doing undo or redo or copy/paste gojs should not use such temporary data.
so lets say on the node i have added 1 property called as Roles. If user does undo and does redo again, then it should add the node without Roles property.
You say that you do not want the UndoManager to know about the “Roles” property. So it seems odd to expect the model to know not to copy that property when copying a node data object.
But if that is what you want, you can supply a function that does what you want as the Model | GoJS API
I have implemented this function, it works fine for the copy/paste functionalities.
However the issue for undo and redo is not working as expected. When i am doing undo or redo, copyNodeDataFunction is not called.
I want to remove properties on undo redo operation as well.
We have setup the events FinishedUndo and Finished Redo.
We observed a weird behaviour in the Undo functionality.
We have node, which doesnt have certain property when its added to canvas. After that we added 2-3 properties on that Node without Transaction.
After that we added another node and added 2-3 properties without Transaction.
Now when user is hitting Undo button, it removes the Node which was added to canvas (Since its a part of transaction), but also it removes all the custom properties which were added to previously added Node.
When i am performing an Undo, shouldn’t it revert only what was part of transaction ?