when i tried contextMenu inside this function The error will show adornedPart is not property with obj.part.
$(“ContextMenuButton”,
$(go.TextBlock, "Edit", { font: "bold 16px sans-serif",textAlign:"center",width:50,height:20,margin: 8, stroke: "royalblue"}),
{ click: function(e, obj){
var ctxmnu = obj.part;
var part = ctxmnu.adornedPart; // is Not property for obj.part
}
})