Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Adding additional data to the model of diagram

$
0
0

@noonhe wrote:

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?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles