How to update all node data object?

Hi,
How to update node data object ?? (not special properties)
I need to update whole node.data object. I don’t wont to use setDataProperty because my data object contains many properties.

I execute some type of calculation on the server and after this i get json and wish to update all my
nodeArray data.
Thx

When i use direct update like this:

<span =“apple-tab-span”="" style=“white-space:pre”> data is some object : key , category and etc.
<span =“apple-tab-span”="" style=“white-space:pre”> during editing this object i change only my properties without touching key.

    myDiagram.startTransaction("Update State");
    node.data = data;
    myDiagram.commitTransaction("End State");

after updating model nodeArray with same key and links from the server i see additional node.


Please see attached image:









If you are using the same JavaScript object as the node data object and the key value remains unchanged, but many of the other properties may have changed, you could call node.updateTargetBindings().

If you have updated many node data objects and don’t mind the overhead of updating all of the Nodes (and Links) in the Diagram, you could call diagram.updateAllTargetBindings().

However, the disadvantage of not calling Model.setDataProperty is that the model data changes are not recorded in the UndoManager, if that is in use.

Thx