Hi,
1- I want to add some new attributes to the model of a diagram before sending it to server with API.
saveDiagram(){
let newModel = this.diagram.model;
let obj = {
text:"test",
description:"test"
}
let newModel2 = {...newModel , ...obj};
newModel2 = newModel2.toJson();
but there’s an error for toJson function.
is there a way to do this?
2- If I don’t want to let userto delete particular nodes based on their id’s how can I have access to that Id in the SelectionDeleting addDiagramListener?
thanks for your reply. can you please explain more about the second question?
I don’t know how to prevent deleting node after I detected the node’s Id. how can I stop deleting process?
btw I’m coding in Angular 8
this.diagram.addDiagramListener("SelectionDeleting", (e)=>{
let part = e.subject.first();
if(!part.jb.stateId){
//what should I do here?
}
})