{
// a mouse-over highlights the link by changing the first main path shape's stroke:
mouseEnter: function(e, link) { link.elt(0).stroke = "rgba(0,90,156,0.3)"; },
mouseLeave: function(e, link) { link.elt(0).stroke = "transparent"; }
}
In typescript, this elt is not a known property of link. I had to fallback on link['elt'](0).stroke
This assumes you have declared those event handlers on the Link itself, not on some GraphObject within the link template. That is normally desired, so that the mouse passing over a label (including the arrowhead) will result in event bubbling up to the Link.
The event handlers are in the link template. I thought that was the right place to do it, at least this is how it is demonstrated here GoJS Links -- Northwoods Software.
can you show me some example ? how would I do it on the link itself ? (in linkdata ?)