Echo.Sync
Extent
Class Hierarchy:

Provides tools for rendering extent (dimension) properties.

Class Field Summary
Internal _PARSER
Regular expression to parse an extent value, e.
Internal _FORMATTED_INT_PIXEL_TEST
Regular expression to determine if an extent value is already formatted to pixel units.
Internal _FORMATTED_DECIMAL_PIXEL_TEST
Regular expression to determine if an extent value is already formatted to pixel units.

Class Method Summary
Public isPercent()
Determines if an extent has percent units.
Public render()
Renders an extent value to an element.
Public toCssValue()
Returns a CSS representation of an extent value.
Public toPixels()
Converts an extent value to pixels.

Class Method Detail
isPercent
Determines if an extent has percent units.
Parameters:
extent (#Extent) - the Extent
Returns:
(Boolean) true if the extent has percent units

render
Renders an extent value to an element.
Parameters:
extent (#Extent) - the Extent
element (Element) - the target element
styleAttribute (String) - the style attribute name, e.g., "padding-left", or "width"
horizontal (Boolean) - flag indicating whether the value is being rendered horizontally
allowPercent (Boolean) - flag indicating whether percent values should be rendered

toCssValue
Returns a CSS representation of an extent value.
Parameters:
extent (#Extent) - the Extent
horizontal (Boolean) - flag indicating whether the value is being rendered horizontally
allowPercent (Boolean) - flag indicating whether percent values should be rendered
Returns:
(String) the rendered CSS value or the empty string ("") if no value could be determined (null will never be returned)

toPixels
Converts an extent value to pixels.
Parameters:
extent (#Extent) - the Extent
horizontal (Boolean) - flag indicating whether the value is being rendered horizontally
Returns:
(Number) $functionDO.getReturnDescription()