I'm using go.js and I added a ContextMenu to my diagram. One of the buttons is a "visit" button, which should redirect user to a certain URL. My problem is that those URLs are generated using IDs. I wanted to know if it's possible to set some attributes to a node, and use them in my contextMenu.
I'm using a go.panel
for creating my nodes, and some go.TextBlock
in them. All the data used to create the nodes are from a JSON array, exactly like in this example
Here is my contextMenu :
$(go.Adornment, "Vertical",
$("ContextMenuButton",
$(go.TextBlock, "Visit",
{ click: function(e, obj) { VisitGroup(obj); } }))
);
I dont know how to set attributes to nodes, and how to access any information related to the node. Thanks !