* Function: ng_BeginMeasureElement * Prepares element for dimension measurement. * Makes sure all parent object have proper display style. * * Syntax: * array *ng_BeginMeasureElement* (object elm) * * Parameters: * elm - object element * * Returns: * List of modi
(o)
| 1664 | * <ng_EndMeasureElement> |
| 1665 | */ |
| 1666 | function ng_BeginMeasureElement(o) |
| 1667 | { |
| 1668 | if((o)&&((!o.offsetHeight)||(!o.offsetWidth))) |
| 1669 | { |
| 1670 | if(typeof o.measure_info !== 'undefined') return o.measure_info; |
| 1671 | |
| 1672 | var arr = new Array(); |
| 1673 | var p = o; |
| 1674 | var displaystyle=(ngIExplorer ? '' : 'inherit'); |
| 1675 | //iterate through parent nodes |
| 1676 | while((p)&&(p!=document)) |
| 1677 | { |
| 1678 | if(typeof p.measure_info !== 'undefined') break; |
| 1679 | if((p)&&(p.style)&&(p.style.display === 'none')) //if display is none save parent and change it to inherit |
| 1680 | { |
| 1681 | arr.push(p); |
| 1682 | p.style.display = displaystyle; |
| 1683 | } |
| 1684 | p = p.parentNode; |
| 1685 | } |
| 1686 | //compute height and width again |
| 1687 | var fix7=o.offsetLeft; //IE fix |
| 1688 | |
| 1689 | if(arr.length) |
| 1690 | { |
| 1691 | o.measure_info = arr; |
| 1692 | return arr; |
| 1693 | } |
| 1694 | } |
| 1695 | return undefined; |
| 1696 | } |
| 1697 | |
| 1698 | /** |
| 1699 | * Function: ng_EndMeasureElement |
no outgoing calls
no test coverage detected