I’d like to make possible for the user to change relationship between nodes relinking links like in the OrgChart sample. I set the following in my link template relinkableFrom: true, relinkableTo: true
Now, when I click on a link, I see the little handles at the beginning and at the end of the link and I can drag them around but when I drop it on a different node, nothing happen. What else I need to have relinking feature working? I am using GraphLinksModel with a SideTreeLayout.
I still think it is a link validation problem. But I cannot explain it without a lot more information.
See for example the Org Chart Editor sample, which does allow some cases of relinking: Org Chart Editor. Notice that it does set Diagram.validCycle, which is why some relinkings are not valid and thus not permitted.
ok, I found the problem! :-) I was been confused by this phrase in the documentation:
You can certainly declare a Panel to have GraphObject.fromLinkable or GraphObject.toLinkable be true. This will cause all elements inside that panel to behave as part of the port, including starting a linking operation. Sometimes you will want to make the whole Node linkable.If you still want the user to be able to select and drag the node, you will need to make some easy-to-click elements not-“linkable” within the node
So I set fromLinkable and toLinkable in the first big panel inside my node.
Now, that I moved the “Linkable” properties at the Node level, the top level, linking is working as expected.
To be honest, it is still not completely clear to me why setting linkeable in the inner panel didn’t work…