CommandManager stopping #3069
-
IntroductionQuestion about CommandManager. Can I stop it from working? The thing is, I receive a diagram from the backend, parse it, and then add all the necessary links/shapes using graph.addCells(). But the problem is that the user can click the undo button, and then the whole diagram will disappear... Is it possible to stop CommandManager until I insert the entire diagram, and then turn it back on for user actions? Steps to reproduce... Restrictions & Constraints... Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS+ |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
After loading the diagram, you can reset the CommandManager's history with |
Beta Was this translation helpful? Give feedback.
-
|
Wow, How did I not think of that before? :D Thanks a lot! |
Beta Was this translation helpful? Give feedback.
After loading the diagram, you can reset the CommandManager's history with
commandManager.reset()function (https://docs.jointjs.com/api/dia/CommandManager/#reset). This method clears both the undo and the redo stacks.