Undo Manager Time Consistency?

Hi,

just i made some transactions and leaved the screen for approx. 5 minutes and later i can’t undo the previous ones. can u please suggest?
if i do the transactions continuously it works perfect.

The GoJS implementation does nothing unless there has been some event. If you try your situation in any of the GoJS samples, can you reproduce the problem? It should be the case that you can wait as long as you want and it won’t matter. There are exceptions, but they are all due to your code having asked us to do something asynchronously, such as loading images. Do you have some code running in a setTimeout or other asynchronous call?

hi,

i cannot reproduce it with given samples. yes there is setTimeout in code. thanks.

OK, my guess is that in the timeout code you are making some change that is causing the UndoManager to discard the history after the current state to which the user had undone.

1 Like