Link selection, prevent link to go on another elements of the links

I have links made of a panel and a bezier curve. When a link is selected, the bezier curve is display above the panel, and i do not want that. What is the correct way to prevent this behaviour ?

What are the results that you are getting? (A screenshot would help, along with the link template.) What is it that you want?

Have you specified a Part.selectionAdornmentTemplate?

Here is the link, not selected :

Here is the link, selected

I want the curve to stay “under” the link label.

I have one adornmentTemplate. I think the problem is that adornment have a specific layer that put them on the foreground, so whatever i do, the adornment will always be on front of the graphObjects of a link.

That means that i should either move the link label to another layer, or do not use Adornment, but just change the stroke color of the arrow via event listeners. I am right ?

Yes, that is what is happening. Adornments are (by default) put in the “Adornment” Layer, which is in front of the regular Layers.

I suppose you could re-order the layers so that the “Adornment” layer is behind whatever layer(s) that your links are in, but then it would be likely that you would never see any adornment, because it would be behind the link. Hmm, unless you made the path shape in the adornment much thicker than the adorned Link.path.

An alternative is not to use an Adornment to show the selection, but to modify the Link.path itself. See, but not the first couple sections about adornments.

Thanks, will take a look