Hooking in the Shape and Connection events

Hi I want to build a backtrack function where the user can go x steps back then working. I am currently trying it with the eventBus with this tutorial. Also I found this Entry in the Forum where I found the list of different shape and connection events. My problem is that only the shape/connection.added seems to be working but I also want to implement delete and moved.
Can anybody tell me the right event name? thanks in advance :smile:

Do you mean undo? That’s a built-in feature of bpmn-js. Simply do modeler.get('commandStack').undo();.

Yes that was it :laughing:. I didn’t know that this exists

No worries. Happy to help. You can also use CommandStack#redo (cf. diagram-js/CommandStack.js at develop · bpmn-io/diagram-js · GitHub). :+1:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.