Switching Between Links after Link Drawn Based On Node's Data

Hiii Walter,

I have a requirement in which i can draw a link between two nodes , based on the data on both nodes(From and To) i need to switch between two links , one is normal link with basic data and other with data object to store some more information other than link related data. how can i implement this with gojs.

like above picture based on nodes data how to make one of the link connected.

Thanks in advance.

If, as is likely, you are using two different link templates, one for each kind of link, then you can just change the category property of the link data object:

myDiagram.model.commit(function(m) {
    m.setCategoryForLinkData(link.data, ..another-category...);
}, "changed link category");