///
* | xxxxxxxxxx |
* ^^^^^^^^^^ ^^^^ ^^^^^
* 10px elem 5px
*
*
* If an element is positioned before the start of its offsetParent, the
* startOffset may be negative. This can be used with setScrollOffset to
* reliably scroll to an element:
*
*
* var scrollOffset = goog.style.bidi.getOffsetStart(element);
* goog.style.bidi.setScrollOffset(element.offsetParent, scrollOffset);
*
*
* @see setScrollOffset
*
* @param {Element} element The element for which we need to determine the
* offsetStart position.
* @return {number} The offsetStart for that element.
*/
function getOffsetStart(element: Element): number;
/**
* Sets the element's scrollLeft attribute so it is correctly scrolled by
* offsetStart pixels. This takes into account whether the element is RTL and
* the nuances of different browsers. To scroll to the "beginning" of an
* element use getOffsetStart to obtain the element's offsetStart value and then
* pass the value to setScrollOffset.
* @see getOffsetStart
* @param {Element} element The element to set scrollLeft on.
* @param {number} offsetStart The number of pixels to scroll the element.
* If this value is < 0, 0 is used.
*/
function setScrollOffset(element: Element, offsetStart: number): void;
/**
* Sets the element's left style attribute in LTR or right style attribute in
* RTL. Also clears the left attribute in RTL and the right attribute in LTR.
* @param {Element} elem The element to position.
* @param {number} left The left position in LTR; will be set as right in RTL.
* @param {?number} top The top position. If null only the left/right is set.
* @param {boolean} isRtl Whether we are in RTL mode.
*/
function setPosition(elem: Element, left: number, top: number, isRtl: boolean): void;
}