Launching bootstrap pop-over on click of a button

If I have a button in a diagram as below,

                            $("Button",{width:20, height:20,alignment: new go.Spot(1, 1),cursor: "pointer"},
                                $(go.Picture,{  source: "images/business_card.png", width:20, height:20}),{
                                    click: function(e, obj) {

                                    }
                                }
                            ) 

how can I show bootstrap popover with some content to the right of the button element?
Is there a way to specify an ID for the button that can be used by the popover (getElementById) to place the popover to the right of the button for example?

Please advise.

There are two things you need: the node that was clicked and where it is.

Assuming the Button is in the visual tree of the node, you can get the node or its bound data, as shown in the documentation for GraphObject.click: GraphObject | GoJS API.

The InputEvent.viewPoint will give you the point at which the click happened in viewport coordinates. That’s relative to the top-left corner of the Diagram’s HTML DIV element.

  click: function(e, obj) {
        alert(obj.part.data.key + " " + e.viewPoint);
    }