Home

# Class goog.ui.Popup

The Popup class provides functionality for displaying an absolutely positioned element at a particular location in the window. It's designed to be used as the foundation for building controls like a menu or tooltip. The Popup class includes functionality for displaying a Popup near adjacent to an anchor element. This works cross browser and thus does not use IE's createPopup feature which supports extending outside the edge of the brower window.

extends goog.ui.PopupBase

Instance Method Summary
| `getMargin() ⇒ ?goog.math.Box` Returns the margin to place around the popup.
| `getPinnedCorner() ⇒ ?goog.positioning.Corner` Returns the corner of the popup to used in the positioning algorithm.
| `getPosition() ⇒ ?goog.positioning.AbstractPosition`
| `reposition()` Repositions the popup according to the current state.
| `setMargin((goog.math.Box|null|number) arg1, number= opt_arg2, number= opt_arg3, number= opt_arg4)` Sets the margin to place around the popup.
| `setPinnedCorner(?goog.positioning.Corner corner)` Sets the corner of the popup to used in the positioning algorithm.
| `setPosition(?goog.positioning.AbstractPosition position)` Sets the position helper object associated with the popup.

Static Method Summary
| `positionAtCoordinate(?goog.math.Coordinate absolutePos, ?Element movableElement, ?goog.positioning.Corner movableElementCorner, ?goog.math.Box= opt_margin) ⇒ boolean` Positions the specified corner of the movable element at the specified coordinate.

`positionPopup(?Element anchorElement, ?goog.positioning.Corner anchorElementCorner, ?Element movableElement, ?goog.positioning.Corner movableElementCorner, ?goog.math.Coordinate= opt_offset, ?goog.math.Box= opt_margin, number= opt_overflow) ⇒ boolean`

Positions a movable element relative to an anchorElement. The caller specifies the corners that should touch. This functions then moves the movable element accordingly.