Itâs hard for us to give good advice when we do not know all of the goals and constraints that you have for the functionality that you want to users to access.
For each GraphObject that you might want the user to focus on, imagine all of the information that you want to show and all of the next steps that they could take.
Youâll want there to be an abstract notion of focus that indicates which GraphObject has the âfocusâ and provides the information to be communicated and which commands apply for further navigation or actions. The GraphObject might be a Part (such as a Node or a Link or an Adornment), or it could be a GraphObject within such a Part (such as a âButtonâ or other GraphObject acting as a control of some sort).
Of course only you know what information to provide about each object of focus, and only you know what all of the commands might apply to that focus object â which navigation commands and which action commands.
For any focus object, including Parts, there could be GraphObject.click or doubleClick event handlers that you could invoke, as well as maybe showing its contextMenu or toolTip.
For any Node, there are a bunch of properties and methods that you can use to determine its relationship with connected Links and connected Nodes.
If you app is tree-structured, there are various properties and methods on the Node class to deal with trees.
If your app has Groups, you can find a Groupâs contained Nodes and Links via the Group.memberParts property. And for any Part, use its Part.containingGroup to find what itâs a member of, if anything.
For any Link, there are a bunch of properties and methods that you can use to determine its relationship with Nodes. That includes Link.fromNode and toNode, but also fromPort and toPort if node might have more than one port per node.
I donât know if this applies to your app, but a Link can also contain Nodes, Link.labelNodes, for attaching Links to Links. Your app probably does not use this feature.
Adornments are Parts, so a context menu or a tooltip (if implemented in GoJS rather than in HTML), or any GraphObject within it, would also be a valid focus object.