The goog.positioning.ViewportClientPosition Class

goog.positioning.ViewportClientPosition
> goog.positioning.ClientPosition
> goog.positioning.AbstractPosition

goog.positioning.ViewportClientPosition(arg1, opt_arg2)

Encapsulates a popup position where the popup is positioned relative to the window (client) coordinates, and made to stay within the viewport.

arg1 {number|goog.math.Coordinate}
Left position or coordinate.
opt_arg2 {number=}
Top position if arg1 is a number representing the left position, ignored otherwise.

.reposition(element, popupCorner, opt_margin, opt_preferredSize)

Repositions the popup according to the current state.

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

.setLastResortOverflow(overflow)

Set the last-resort overflow strategy, if the popup fails to fit.

overflow {number}
A bitmask of goog.positioning.Overflow strategies.