Selecting Node intermittent

I have a diagram with perhaps 1000 nodes. I implemented ObjectSingleClicked and traverse the links to highlight the links going back upward. When a Node is between a bunch of lines the Click event fires but it tells me its a link and not a GoBasicNode. Then you can see some blue dot artifacts getting highlighted . You can actually drag that and the line moves. Almost like its a layering issue, I am adding all nodes to 1 document with no explicit layers or sub groups. Add nodes and links in a loop basically. You can see below other nodes are detected and the links highlight. If I click a node below the trouble node all the lines highlight up including the node not detecting its a node I am attempting to click. I Zoom WAY in so there is no chance I am not clicking it. click top, bottom, sides, middle the event fires but it says I am clicking a link not a GoBasicNode.

  1. See click working and lines highlight.
  2. See click not working (on Node next to the working one) but see the blue dots to the right. (debugger confirms it thinks type is a GoLink)
  3. See me move the line with the dots. Still can’t get to the node no matter how much I move the line.



Private Sub GoViewer_ObjectSingleClicked(sender As Object, e As GoObjectEventArgs) Handles GoViewer.ObjectSingleClicked
    Dim node1 As New GoBasicNode

    ResetHighlightEdges()

    If e.GoObject.TopLevelObject IsNot Nothing Then
        If TypeName(e.GoObject.TopLevelObject) = "GoBasicNode" Then
            node1 = CType(e.GoObject.TopLevelObject, GoBasicNode)
            HighlightUpEdges(node1.Text)
        End If
    End If
End Sub

Appears to be lines in front of the node, perhaps I should not check TopLevelObject, or perhaps is there a code snippet to bring the nodes to front after the diagram is complete?

lines topmost

Check the User Guide section 4. Documents and Objects.

In particular, look for the discussion on LinksLayer.

doc.LinksLayer = doc.Layers.CreateNewLayerAfter(doc.Layers.Default)

That line of code will put all the links in front (drawn after the default layer, so therefore “on top”).

Just change that to “Before” the default layer if you want all the links drawn before the nodes.