Hi, im trying to add a new node when the user clicks a Button. All the info will be a local data, so I can't use CRUD options.
What i'm trying is add a new object of my JSON file in the onClick method
this.myJsonData = {...this.myJsonData,25:{
"Name": "NEWNode",
"ReportingPerson": [
"node11"
],
"fillColor": "#e7704c",
"border": "#c15433"}
}
After this I call my data['doBinding'] to add this new JSON to my data
this.data['doBinding'] = (nodeModel: NodeModel, data: DataInfo, diagram: Diagram) => {
nodeModel.shape= { type: 'Text', content: data['Name'] };
nodeModel.style = {color: 'red'}
}
After this i just call to:
But it doesnt work
I attached the Angular project,
Thank you
Brandon
Attachment:
flowchartzip_1fb15abd.zip