ui.Popup.ClientPosition Extends goog.positioning.AbstractPosition
Encapsulates a popup position where the popup is positioned relative to the window (client) coordinates. This calculates the correct position to use even if the element is relatively positioned to some other element. This is for trying to position an element at the spot of the mouse cursor in a MOUSEMOVE event. Just use the event.clientX and event.clientY as the parameters.

Inheritance

Constructor

goog.ui.Popup.ClientPosition(arg1opt_arg2)

Parameters

arg1 : number | !goog.math.Coordinate
Left position or coordinate.
opt_arg2 : number=
Top position.

Instance Methods

Public Protected Private
reposition(movableElementcorneropt_marginopt_preferredSize)
Repositions the element. Abstract method, should be overloaded.
Arguments:
movableElement : Element
Element to position.
corner : goog.positioning.Corner
Corner of the movable element that should be positioned adjacent to the anchored element.
opt_margin : goog.math.Box=
A margin specified in pixels.
opt_preferredSize : goog.math.Size=
PreferredSize of the movableElement.
code »

Package ui.Popup

Package Reference