ui.Tooltip.CursorTooltipPosition Extends goog.positioning.ViewportPosition
Popup position implementation that positions the popup (the tooltip in this case) based on the cursor position. It's positioned below the cursor 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 the cursor.

Inheritance

Constructor

goog.ui.Tooltip.CursorTooltipPosition(arg1opt_arg2)

Parameters

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

Instance Methods

Public Protected Private
reposition(elementpopupCorneropt_margin)
Repositions the popup based on cursor position.
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.
opt_margin : goog.math.Box=
A margin specified in pixels.
code »
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.
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 »
constructor :
No description.
Code »
coordinate : goog.math.Coordinate
No description.
Code »

Static Properties

goog.ui.Tooltip.CursorTooltipPosition.superClass_ :
No description.
Code »

Package ui.Tooltip

Package Reference