After loading the model from JSON, we potentially upgrade any legacy information in the nodes before assigning the model to the diagram. All this works fine. The issue is that I want to visibly indicate to the user that the diagram has effectively been modified by the upgrade step.
How can I do this?
I’ve tried setting myDiagram.isModified to true at various places (even in the InitialLayoutCompleted handler), but by the time the “Modified” event handler runs and examines myDiagram.isModified, it’s set to false.
What needs to be done to mark the diagram as modified, or at least have the “Modified” event learn the truth in this case?
Here is my model loading step:
let model = this.loadFromFile(this.props.editor.uri); // i.e. model = go.Model.fromJson(data); this.versionUpModified = versionUpModel(model); myDiagram.model = model;
Thank you.