Click event get partId

Hi,

I have a itemsTemplate defined as below:-

var _branchTemplate =
            GO(go.Panel, "TableRow", // this Panel is a row in the containing Table
              new go.Binding("portId", "branchName"),  // this Panel is a "port"
              {
                  background: "transparent",  // so this port's background can be picked by the mouse
                  fromSpot: go.Spot.Right,  // links only go from the right side
                  fromLinkable: true,
                  toLinkable: false,
                  fromMaxLinks: 1
              },
              GO(go.Shape,
                {
                    width: 12,
                    height: 12,
                    strokeWidth: 1,
                    margin: 0,
                    fromLinkable: false,
                    toLinkable: false,
                    column: 1,
                    stroke: "#404040",
                    fill: "#25A0DA",
                    alignment: go.Spot.Right,
                    click: function (e, obj) {

                        var s = e.targetObject;

                        console.log(s);
                    }
                }
                ),
              GO(go.TextBlock,
                {
                    column: 0, height: 20,
                    margin: new go.Margin(0, 2), font: "9pt Helvetica, Arial, sans-serif",
                    stroke: "#25A0DA",
                    fromLinkable: true,
                    toLinkable: false
                },
                new go.Binding("text", "displayName"))

            );

In the click event for the shape i need to grab the portId.

How can I do this ?

Thanks

Hi,

I have worked this out using the following :-:

var s = obj.panel.portId;