-
-
Notifications
You must be signed in to change notification settings - Fork 757
use single undoManager for multiple types #156
Copy link
Copy link
Closed
Description
I'm glad to see new implentation of UndoManager, it is much cleaner!
For my task I need something like this:
new UndoManager([ type1, type2 ])
to have the same stack for both type1 and type2, so their changes can be captured together with the same StackItems. I tried to set separate observers for the types, but the problem is when I do undo and the undoying StackItem has changes in both types it creates two StackItems for the redo stack(UndoManager do not capture items together for undo/redo). I also tried using the afterTransaction event to listen to changes instead of using observeDeep, but result was the same, because afterTransaction also was being called twice for undo.
@dmonad do you have any ideas on how to implement this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels