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

Inheritance

Constructor

goog.positioning.ViewportClientPosition(arg1opt_arg2)

Parameters

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.

Instance Methods

Public Protected Private
reposition(elementpopupCorneropt_marginopt_preferredSize)
Repositions the popup according to the current state.
Arguments:
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.
code »
setLastResortOverflow(overflow)
Set the last-resort overflow strategy, if the popup fails to fit.
Arguments:
overflow : number
A bitmask of goog.positioning.Overflow strategies.
code »
reposition(movableElementmovableElementCorneropt_marginopt_preferredSize)
Repositions the popup according to the current state
Arguments:
movableElement : Element
The DOM element of the popup.
movableElementCorner : 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 of the element.
code »
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 »

Instance Properties

constructor :
No description.
Code »
lastResortOverflow_ :
The last-resort overflow strategy, if the popup fails to fit.
Code »
constructor :
No description.
Code »
coordinate : goog.math.Coordinate
Coordinate to position popup at.
Code »

Static Properties

goog.positioning.ViewportClientPosition.superClass_ :
No description.
Code »

Package positioning

Package Reference