static/ext/src/dom/Element_position.js
function(getRegion) {
            var me = this,
                dom = me.dom,
                isDoc = dom.nodeName == BODY,
                w = isDoc ? Ext.Element.getViewWidth() : dom.offsetWidth,
                h = isDoc ? Ext.Element.getViewHeight() : dom.offsetHeight,
                xy = me.getXY(),
                t = xy[1],
                r = xy[0] + w,
                b = xy[1] + h,
                l = xy[0];

            if (getRegion) {
                return new Ext.util.Region(t, r, b, l);
            }
            else {
                return {
                    left: l,
                    top: t,
                    width: w,
                    height: h,
                    right: r,
                    bottom: b
                };
            }
        }
function(getRegion) {
            var me = this,
                dom = me.dom,
                isDoc = dom.nodeName == BODY,
                w = isDoc ? Ext.Element.getViewWidth() : dom.offsetWidth,
                h = isDoc ? Ext.Element.getViewHeight() : dom.offsetHeight,
                xy = me.getXY(),
                t = xy[1],
                r = xy[0] + w,
                b = xy[1] + h,
                l = xy[0];

            if (getRegion) {
                return new Ext.util.Region(t, r, b, l);
            }
            else {
                return {
                    left: l,
                    top: t,
                    width: w,
                    height: h,
                    right: r,
                    bottom: b
                };
            }
        }
function ( getRegion ) { var me = this , dom = me . dom , isDoc = dom . nodeName == BODY , w = isDoc ? Ext . Element . getViewWidth ( ) : dom . offsetWidth , h = isDoc ? Ext . Element . getViewHeight ( ) : dom . offsetHeight , xy = me . getXY ( ) , t = xy [ 1 ] , r = xy [ 0 ] + w , b = xy [ 1 ] + h , l = xy [ 0 ] ; if ( getRegion ) { return new Ext . util . Region ( t , r , b , l ) ; } else { return { left : l , top : t , width : w , height : h , right : r , bottom : b } ; } }
Returns an object defining the area of this Element which can be passed to
{@link Ext.util.Positionable#setBox} to set another Element's size/location to match this element.

@param {Boolean} [asRegion] If true an Ext.util.Region will be returned
@return {Object/Ext.util.Region} box An object in the following format:

{
left: <Element's X position>,
top: <Element's Y position>,
width: <Element's width>,
height: <Element's height>,
bottom: <Element's lower bound>,
right: <Element's rightmost bound>
}

The returned object may also be addressed as an Array where index 0 contains
the X position and index 1 contains the Y position. So the result may also be
used for {@link #setXY}
@deprecated use {@link Ext.util.Positionable#getBox} to get a box object, and
{@link Ext.util.Positionable#getRegion} to get a {@link Ext.util.Region Region}.
Returns an object defining the area of this Element which can be passed to { @link Ext . util . Positionable#setBox } to set another Element s size / location to match this element .