Hey!
You could have a look at CommandStack.js under diagram-js project (lib/command/CommandStack.js). You should listen to elements.changed event. Here’s the explanation from the documentation:
Change Tracking
During the execution of the CommandStack it will keep track of all
elements that have been touched during the command’s execution.At the end of the CommandStack execution it will notify interested
components via an ‘elements.changed’ event with all the dirty
elements.The event can be picked up by components that are interested in the fact
that elements have been changed. One use case for this is updating
their graphical representation after moving / resizing or deletion.