Core.Web
Measure
Class Hierarchy:

Namespace for measuring-related operations.

Descendant Class Summary
Core.Web.Measure.Bounds

Class Field Summary
Internal _scrollElements
Internal _hInch
Size of one inch in horizontal pixels.
Internal _vInch
Size of one inch in vertical pixels.
Internal _hEx
Size of one 'ex' in horizontal pixels.
Internal _vEx
Size of one 'ex' in vertical pixels.
Internal _hEm
Size of one 'em' in horizontal pixels.
Internal _vEm
Size of one 'em' in vertical pixels.
Public SCROLL_WIDTH
Estimated scroll bar width.
Public SCROLL_HEIGHT
Estimated scroll bar height.
Internal _PARSER

Class Method Summary
Public extentToPixels()
Converts any non-relative extent value to pixels.
Internal _calculateExtentSizes()
Updates internal measures used in converting length units (e.
Internal _getScrollOffset()
Measures the scrollbar offset of an element, including any scroll-bar related offsets of its ancestors.
Internal _getCumulativeOffset()
Measures the cumulative offset of an element.

Class Method Detail
extentToPixels
Converts any non-relative extent value to pixels. Returns null in the case of a percentage extent.
Parameters:
value (String) - a unitized extent value, e.g., "2px", "5em", etc.
horizontal (Boolean) - a flag indicating whether the extent is horizontal (true) or vertical (false)
Returns:
(Number) the pixel value (may have a fractional part)

_calculateExtentSizes
Updates internal measures used in converting length units (e.g., in, mm, ex, and em) to pixels. Automatically invoked when Core.Web module is initialized.

_getScrollOffset
Measures the scrollbar offset of an element, including any scroll-bar related offsets of its ancestors.
Parameters:
element - the element to measure
Returns:
(Object) the offset data, with 'left' and 'top' properties specifying the offset amounts

_getCumulativeOffset
Measures the cumulative offset of an element.
Parameters:
element - the element to measure
Returns:
(Object) the offset data, with 'left' and 'top' properties specifying the offset amounts