function sap/ui/dom/denormalizeScrollBeginRTL

Visiblity: public
Available since: N/A
Module: sap/ui/dom/denormalizeScrollBeginRTL
Application Component:

For the given scroll position measured from the "beginning" of a container (the right edge in RTL mode) this method returns the scrollLeft value as understood by the current browser in RTL mode. This value is specific to the given DOM element, as the computation may involve its dimensions.

So when oDomRef should be scrolled 2px from the beginning, the number "2" must be given as iNormalizedScrollBegin and the result of this method (which may be a large or even negative number, depending on the browser) can then be set as oDomRef.scrollLeft to achieve the desired (cross-browser-consistent) scrolling position. Low values make the right part of the content visible, high values the left part.

This method does no scrolling on its own, it only calculates the value to set (so it can also be used for animations).

Only use this method in RTL mode, as the behavior in LTR mode is undefined and may change!


Parameters Overview

Param Type Default Value Description
iNormalizedScrollBegin int The distance from the rightmost position to which the element should be scrolled
oDomRef Element The DOM Element to which scrollLeft will be applied

Methods Overview

Method Description