Event for diagram completed

Hi, is there any event for diagramCompleted or diagramDrawingCompleted.

We want to apply some changes on some nodes/links after every drawing,
We are redrawing the diagram by changing node array and link array.

_diagram.model.nodeDataArray = _nodeArray; // Line 1
_diagram.model.linkDataArray = _linkArray;<span =“apple-tab-span”="" style=“white-space:pre”> // Line 2
_applyChangesOnNodes();<span =“apple-tab-span”="" style=“white-space:pre”> // Line 3
// setTimeout(_applyChangesOnNodes,10); // Line 4

But the nodes/links are not available at Line 3, seems like layout is taking some time to update it.
So to make it accessible we are using a small timeout of 10 ms.

Is there any diagram or layout callback event, which will be fired exactly after the diagram is ready.

When initializing a diagram, if you create the Model separately and then assign Diagram.model, you can depend on the “InitialLayoutCompleted” DiagramEvent (http://gojs.net/latest/intro/events.html).

When making changes to an existing diagram, you should do so within a transaction. So you could call _applyChangesOnNodes() after the call to commitTransaction.