goog.positioning
Functions
flipCorner( corner ) → goog.positioning.Corner
goog.positioning.Corner
Returns the corner opposite the given one horizontally and vertically.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
flipCornerHorizontal( corner ) → goog.positioning.Corner
goog.positioning.Corner
Returns the corner opposite the given one horizontally.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
flipCornerVertical( corner ) → goog.positioning.Corner
goog.positioning.Corner
Returns the corner opposite the given one vertically.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
getEffectiveCorner( element, corner ) → goog.positioning.Corner
goog.positioning.Corner
Returns an absolute corner (top/bottom left/right) given an absolute or relative (top/bottom start/end) corner and the direction of an element. Absolute corners remain unchanged.
Parameters |
| ||||||||
---|---|---|---|---|---|---|---|---|---|
Returns |
|
getOffsetParentPageOffset( movableElement ) → goog.math.Coordinate
goog.math.Coordinate
Calculates the page offset of the given element's
offsetParent. This value can be used to translate any x- and
y-offset relative to the page to an offset relative to the
offsetParent, which can then be used directly with as position
coordinate for positionWithCoordinate
.
Parameters |
| ||||
---|---|---|---|---|---|
Returns |
|
getPositionAtCoordinate( absolutePos, elementSize, elementCorner, opt_margin, opt_viewport, opt_overflow ) → {rect: goog.math.Rect, status: goog.positioning.OverflowStatus}
{rect: goog.math.Rect, status: goog.positioning.OverflowStatus}
Computes the position for an element to be placed on-screen at the specified coordinates. Returns an object containing both the resulting rectangle, and the overflow status bitmap.
Parameters |
| ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
positionAtAnchor( anchorElement, anchorElementCorner, movableElement, movableElementCorner, opt_offset, opt_margin, opt_overflow, opt_preferredSize, opt_viewport ) → goog.positioning.OverflowStatus
goog.positioning.OverflowStatus
Positions a movable element relative to an anchor element. The caller specifies the corners that should touch. This functions then moves the movable element accordingly.
Parameters |
| ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
positionAtCoordinate( absolutePos, movableElement, movableElementCorner, opt_margin, opt_viewport, opt_overflow, opt_preferredSize ) → goog.positioning.OverflowStatus
goog.positioning.OverflowStatus
Positions the specified corner of the movable element at the specified coordinate.
Parameters |
| ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|