Hi,
We have a scenario where more than one links are over each other.
Is there a way that if I selects or highlight any link then it will come over other links, some z-index or something…?
Thanks in advance
Hi,
We have a scenario where more than one links are over each other.
Is there a way that if I selects or highlight any link then it will come over other links, some z-index or something…?
Thanks in advance
Many of our samples have bindings like:
new go.Binding('layerName', 'isSelected', s => s ? 'Foreground' : '').ofObject(),
Yes I have tried this, But in this the link is coming in front of Nodes as well…
I want all the links to be in background, that’s why I have kept, layerName: 'Background'
But in case I have selected or highlighted any links I want it must be above all other links and not in front of nodes.
You could insert a new Layer that is just in front of the layer holding your links. Use that new layer’s name instead of “Foreground”. During Diagram setup:
myDiagram.addLayerAfter($(go.Layer, { name: "ForegroundLinks" }),
myDiagram.findLayer("Background"));
and then in your Link template:
$(go.Link,
{ layerName: "Background" },
new go.Binding("layerName", "isSelected", s => s ? "ForegroundLinks" : "Background").ofObject(),
Thanks Walter,
That’s exactly what I was looking for :)