How to obtain link properties when making a second click on a specific link

Hello, my next question is …

I have a diagram with nodes and links established between them, I need to obtain the specific properties of this link by secondary clicking on one of them,
for now I have this defined.

$GoJS(go.Link,
	{
		layerName: "Foreground",
              	routing: go.Link.AvoidsNodes, corner: 2,
              	curve: go.Link.JumpOver, 
              	toShortLength: 1,
              	relinkableFrom: true, relinkableTo: true,
              	reshapable: true, resegmentable: true 
	},
	$GoJS(go.Panel, "Auto",
		new go.Binding("visible", "isSelected").ofObject()
	),
	{ contextMenu: 
		$GoJS("ContextMenu",
			$GoJS("ContextMenuButton",
				$GoJS(go.Panel, "Horizontal",
                      			ArrowButton(0), ArrowButton(1), ArrowButton(2)
                    		)
 			) 
		)
	}
);

And I am trying to add this to achieve my goal

but I still can’t solve the issue.

they can point me to the right path.

Thanks a lot

A “ContextMenu” is just an Adornment that is a Panel for holding the pieces of the menu, typically including instances of “ContextMenuButton”.

You are providing a function that I assume is meant to be a click or doubleClick event handler. If so, you need to set that property – the static GraphObject.make function cannot know how an argument function is meant to be used.

Look at many of the examples for how to define a click handler for a “ContextMenuButton” (or any kind of “Button” or any kind of GraphObject, really).

Just remember that an Adornment is not the Node or Link itself. If a click event handler is in a context menu (i.e. Adornment), you need to get the Adornment.adornedObject or Adornment.adornedPart to get the object or Node or Link that was context-clicked.