onLinkConnected not call

I have a little issue with GoJS :

I drop nodes on the diagram and create links between some ports.I use onLinkConnected event to call a method to change the link and ports styles according to connected data ports. I save the nodeDataArray and linkDataArray in my database.

Now I reload my App with the previous records saved but :

The onLinkConnected is not call. I tried to use the layoutCompleted event to find connected links on each nodes but the corresponding method (findConnctedLinks) return zero value. How to do this ?

Each link has no points. Why ?

Thanks and merry christmas.


I tried adding these event handlers on my Node template:

          linkConnected: function(node, link, port) {
            console.log("connected " + node + " " + + "-->" +;
          linkDisconnected: function(node, link, port) {
            console.log("disconnected " + node + " " + ? ( + "-->" + : "no data " + link);

and the results were as I expected and I think as you expect upon loading. I also tried drawing a new link (LinkingTool) and reconnecting it (RelinkingTool).

I also tried adding a “LayoutCompleted” DiagramEvent listener:

            "LayoutCompleted": function(e) {
              e.diagram.links.each(function(l) { console.log(l + " " + l.points.count); });

and it doesn’t print zero for any of the links.