Show line on top of all other links

Dear Friends,

Greetings! I have a chart with nodes and subnodes, all are connecting to the center circle. each link has got different colors. When I move the mouse over each nodes, I want to make links connected to that node to come on top of all other links (lines), because some times some links behind the other links. I want to bring up which is focused by mouse over. send back the other one to behind.

pls help me to solve this.

Thanks and Regards,
Syed Abdul Rahim

Please read GoJS Highlighting -- Northwoods Software. But for your requirements you do not need to implement anything to do with Part.isHighlighted.

Instead, in the Node.mouseEnter event handler, temporarily move each connected link to the “Foreground” Layer. Something like

  mouseEnter: function(e, node) {
    node.linksConnected.each(function(link) {
      link.layerName = "Foreground";
    }
  }

In the mouseLeave event handler change the Part.layerName back to its original layer.

That is of course assuming that you are not already using the “Foreground” layer.

Thks Mr.Walter, its working. But when I leave the mouse, how can I change that layer name. i mean when mover finished and when i come out change other node its working… if i go same node again its not working… i mean in foreground layer, last node is there… i can i swap again…

S, i solved by following method:

link.layerName = “Background”;