How to get diagram to trigger a "space apart" on node delete?

Looking at this example:

When I delete a node using [BACKSPACE] , it spaces out all the nodes.

However, when using Diagram.model.removeNodeData, it does not trigger these events.

Is there any way to get these events to trigger?

I need to use removeNodeData because I have a node with N edges, and I only want to delete a subset of those edges so I am using removeNodeData and removeLinkData.

Call myDiagram.layoutDiagram(true) to invalidate all Layouts and cause an automatic layout to be performed soon.

Thanks for replying. Was about to delete this post.

Oddly, it started working. I think it had to do with the fact that shortly after I posted this, I started using transactions and it seems to redraw after a transaction commit!