Hi,
I’m creating label nodes to use on links in the following way,
I also use binding in the link template to bind the “link” property to “labeledLink”.
That works fine, but when I’m trying to convert the model to json with the Model.toJson function. (myDiagram.model.toJson)
I get the following error for each label node
“go.js:17 ERROR: trying to convert a GraphObject or Diagram or Model or Tool or Layout or UndoManager into JSON text: Link#1245(0.5 days)”
My temporary fix was to unlink the label nodes (set the link property to null) before converting the model to json and than when converting the model from json relink the labels.
That works, but I would like to avoid link and relink every time I use Model.toJson/Model.fromJson.
Is there a better solution to make Model.toJson/Model.fromJson work on label nodes?
Thanks,
Dor.