Unable to relink to same port

Hello there,

I am trying to relink a link to a certain port, but it is not working…
Even though having set properties to port:

                toLinkableDuplicates: true,
                fromLinkableDuplicates: true,
                fromMaxLinks: 50,
                toMaxLinks: 50,

Here is the behaviour I obtain

It happens when the selected link has duplicates (same fromport/toport), having said that if I select another link that has no duplicates it behaves correctly.

Now, I am wondering if its due to:

  • duplicates having same key/id in the nodeDataArray
  • its an issue regarding the selection itself, while thinking I am selecting only one link, I am in fact selecting multiple duplicates links. Consequently, I have added a listener but it’s seems that single link is selected on click.

I am thinking of affecting unique key to each links even though they have same path and so are duplicates.

Any thoughts?

EDIT: Even though links having different id’s, it still does not work
EDIT2: Setting property maxSelectionCount to 1, does not change the behaviour either

I didn’t think there was a bug there that I can reproduce.

I’m pretty sure there isn’t a fundamental problem with relinking a link even if there are duplicates. For example, try it in the Basic sample: Basic GoJS Sample.

I modified the Dynamic Ports sample to allow duplicate links and had no problems with relinking individual links that were duplicated or triplicated.