The goog.ui.Tooltip.ElementTooltipPosition Class

goog.ui.Tooltip.ElementTooltipPosition
> goog.positioning.AnchoredPosition
> goog.positioning.AbstractPosition

goog.ui.Tooltip.ElementTooltipPosition(element)

Popup position implementation that positions the popup (the tooltip in this case) based on the element position. It's positioned below the element to the right if there's enough room to fit all of it inside the Viewport. Otherwise it's displayed as far right as possible either above or below the element. Used to position tooltips triggered by focus changes.

element {Element}
The element to anchor the popup at.

.reposition(element, popupCorner, opt_margin)

Repositions the popup based on element position.

element {Element}
The DOM element of the popup.
popupCorner {goog.positioning.Corner}
The corner of the popup element that should be positioned adjacent to the anchorElement.
opt_margin {goog.math.Box=}
A margin specified in pixels.