Draw context menu centered on element

Draw the context menu centered on the bounding box of the target element
rather than the mouse click event. This is also a work around the issue
of figuring out the relative coordinates of the mouse event correctly,
which turns out to be difficult.