in the diagramModelChange(changes: go.IncrementalData): void method i have the updated data for
link and node data for e.g.
draft.diagramLinkData = DataSyncService.syncLinkData(changes, draft.diagramLinkData, appComp.diagramRef.model as go.GraphLinksModel);
draft.diagramModelData = DataSyncService.syncModelData(changes, draft.diagramModelData);
and i have set the draft.skipsDiagramUpdate = true; but still i coudn’t see the updated diagram, anthing i missed?
I’m assuming that your diagramModelChange function is the event handler for the onModelChange of the DiagramProps when using gojs-react.
The purpose of that event handler is to handle the situation where some code associated with the Diagram has modified the GoJS model state and those changes need to be propagated to the React model and the rest of the app.
Those Diagram or Model changes might be the addition or removal of some Nodes or Links, such as calls to Model.addNodeData, or they might be some property changes in the model data via TwoWay Bindings or via code that calls Model.set. The code might be predefined GoJS commands or tools that were invoked, or the code might be yours performed within a transaction.
So, yes, it should not be surprising that any change that you make to the IncrementalData would not be reflected in the Diagram because the assumption is that those changes had already been made to the Diagram/Model.
Oops, wrong guess. OK, the v2 gojs-angular components have the same design, with the assumption that model data is immutable. But if you are using v1 of gojs-angular, that is not the case – data can be modified there, so the component design is quite different.