* Function: ng_ClientWidth * Gets element client width. * * Syntax: * int *ng_ClientWidth* (object elm) * * Parameters: * elm - object element * * Returns: * Width in pixels.
(o)
| 1933 | * Width in pixels. |
| 1934 | */ |
| 1935 | function ng_ClientWidth(o) |
| 1936 | { |
| 1937 | if(!o) return 0; |
| 1938 | var w=ng_GetStylePx(o.clientWidth); |
| 1939 | if(!w) |
| 1940 | { |
| 1941 | ng_BeginMeasureElement(o); |
| 1942 | w=ng_GetStylePx(o.clientWidth); |
| 1943 | ng_EndMeasureElement(o); |
| 1944 | if(!w) |
| 1945 | { |
| 1946 | w=ng_StyleWidth(o); |
| 1947 | w+=ng_GetCurrentStylePx(o,'padding-left') + ng_GetCurrentStylePx(o,'padding-right'); |
| 1948 | } |
| 1949 | } |
| 1950 | return w; |
| 1951 | } |
| 1952 | |
| 1953 | /** |
| 1954 | * Function: ng_ClientHeight |
no test coverage detected