We have chart where user can create WeakLinks along with TreeLinks between nodes.
I need to set and get weak links properties eg: text, curviness and path using points of link. I am trying to set it like this as illusgtrated in State Chart.
foreachnode {
var link = {
category: "TreeLinks",
from: dept['@PARENTNODECODE'],
to: dept['@NODECODE']
}
linkDataArray.push(link)
var link2 = {
category: "WeakLink",
from: dept['@PARENTNODECODE'],
to: dept['@NODECODE'],
text: "test link",
curviness: "20"
}
linkDataArray.push(link2)
}
While links are being set, not able to set text property and path of link. And same is not available in myDiagram.model.linkDataArray.
Regarding deleting: if you haven’t set Part.deletable to false, nor Layer.allowDelete nor Diagram.allowDelete to false, the user should be able to delete a selected Part.
Most of the examples demonstrate this behavior.
I don’t know why you would need TwoWay Bindings in your link template, but what you showed above did not have any Bindings.
Can the user select the “weak link” OK? I don’t see deletable: false on your link template, so it ought to be deleted when the user selects it and deletes it.