@HachimDev wrote:
Hi, I would like to store the model of my diagram to the state of my component and then maybe later to the store
Here is my code :myDiagram.addDiagramListener("ExternalObjectsDropped", function(){ this.saveJson(myDiagram.model.toJson()); console.log("network : ", myDiagram.model.toJson()); });
this is called in the renderCanvas method which is called in ComponentDidMount
The console.log works fine but the function saveJson is undefined
Any idea why the "this" is concidered undefinied ?
thanks
Posts: 5
Participants: 3