Highlight shape when dragging link over

In this example : https://gojs.net/latest/samples/draggableLink.html

when dragging a link over a shape, there is a pink highlight around the shape. Also it is possible to drop the link in the middle of the shape and it will attach automatically.

I cannot figure out which part of the code does that. I was able to reproduce most of it, including the transparent ports, but not the pink highlight.

The two pink shapes are actually temporary ports used by the LinkingTool and RelinkingTool. Please read https://gojs.net/latest/intro/tools.html#LinkingToolAndRelinkingTool

On my Shape, I added fromLinkable and toLinkable and set them to true. Seems to do the trick.

 $(go.Panel, 'Auto',
          $(go.Shape,  new go.Binding('figure', 'figure'), {
            width: 100, height: 40,
            portId: "", fromLinkable: true, toLinkable: true, cursor: "pointer"
          },
            new go.Binding('fill', 'color')
          ),
          $(go.TextBlock, { margin: 8 },
            new go.Binding('text', 'key'))
        ),

That’s different from what I think you were asking about. But that’s OK.