I have read through the various posts regarding this topic, but so far have not found a solution for this specific case.
I have a canvas element, which contains a link-node diagram with a context menu on the nodes and links. We use Go.JS for this, an example of which you can view here: https://gojs.net/latest/samples/customContextMenu.html
From the other posts I’ve read, it seems the consensus is that elements can only be interacted with by using their specific locations. However, the Go.JS graph does not consistently place each element in the same location on load. The location depends on the applied layout, zoom level, and other elements (nodes and links) already present on the graph. Even keeping these constant, the elements may still appear in a slightly different place upon load.
I would love to be able to capture and store each node and link as its own element, which can be identified and interacted with, such as right-clicking to use a context menu as shown in the above linked example.