Multiple Link connectivity

Hi,
I have the following templates in 2 different applications :
diagram.linkTemplate = $(go.Link, { corner: 5 },

        $(go.Shape,
              {
                 stroke: "black", strokeWidth: 2
              }
        )
);

diagram.nodeTemplate =
        $(go.Node, "Auto",  // the Shape automatically fits around the TextBlock
        new go.Binding("position", "loc", go.Point.parse),
		$(go.Picture, { portId: "",
                        fromSpot: go.Spot.AllSides, toSpot: go.Spot.AllSides,
                        width: 120, height: 120 },
                        new go.Binding("source") )
    	);

In the the simple demo application the links are parallels connected :
image

In my main application, the links are connected like that :


And the links can be disconnected if selected :

It worked fine in the past. At some point i messed up the code.
I don’t have a clue where to look for.
Can you guide me ?
Regards,
Tany

Perhaps you set Diagram.layout to an instance of a Layout that sets Link.fromSpot and Link.toSpot. Please read GoJS Link Connection Points on Nodes -- Northwoods Software

Regarding the dragging of Links, you must have set DraggingTool | GoJS API. See also what is set in the Draggable Link sample, Draggable Link

OK,
1:0…
For the disconnected link, i set the dragsLink to true, by mistake,
For the to/fromSpot, you are right, i used LayerDigraphLayout.
So, i set the setPortSpots to false, but still, the links are connected to one Spot.
Be aware that one second (timeout(1000) after layouting the diagram, i reset the Layout back to GridLayout(isOnGoing=isInitial=false) to avoid automiatic layout.
Also note that if i save the diagram to JSON and load it without any Layout, the Links are spoted parallel around the node.

Are you sure you set LayeredDigraphLayout | GoJS API to false?

There’s no need to replace the Diagram.layout – just set Layout.isOngoing to false. And Layout.isInitial to false if you are going to load a new model and don’t want there to be an automatic layout.

Ooooppsss, typo
Now it works fine.
By the way, i also reset the Diagram.layout and Layout.isOngoing to false.
I don’t new Layout() anymore.
Thanks
Tany

If you were using GraphObject.make you should have gotten a warning in the console about setting an unknown property.

mmmmmm…interesting.
Thanks