src/console/simpleyui.js
function(node, node2, all, altRegion) {
        var region = {},
            r = altRegion || DOM.region(node),
            n = node2,
            off;

        if (n.tagName) {
            region = DOM.region(n);
        } else if (Y.Lang.isObject(node2)) {
            region = node2;
        } else {
            return false;
        }
            
        if (all) {
            return (
                r[LEFT]   >= region[LEFT]   &&
                r[RIGHT]  <= region[RIGHT]  && 
                r[TOP]    >= region[TOP]    && 
                r[BOTTOM] <= region[BOTTOM]  );
        } else {
            off = getOffsets(region, r);
            if (off[BOTTOM] >= off[TOP] && off[RIGHT] >= off[LEFT]) {
                return true;
            } else {
                return false;
            }
            
        }
    }
function(node, node2, all, altRegion) {
        var region = {},
            r = altRegion || DOM.region(node),
            n = node2,
            off;

        if (n.tagName) {
            region = DOM.region(n);
        } else if (Y.Lang.isObject(node2)) {
            region = node2;
        } else {
            return false;
        }
            
        if (all) {
            return (
                r[LEFT]   >= region[LEFT]   &&
                r[RIGHT]  <= region[RIGHT]  && 
                r[TOP]    >= region[TOP]    && 
                r[BOTTOM] <= region[BOTTOM]  );
        } else {
            off = getOffsets(region, r);
            if (off[BOTTOM] >= off[TOP] && off[RIGHT] >= off[LEFT]) {
                return true;
            } else {
                return false;
            }
            
        }
    }
function ( node , node2 , all , altRegion ) { var region = { } , r = altRegion || DOM . region ( node ) , n = node2 , off ; if ( n . tagName ) { region = DOM . region ( n ) ; } else if ( Y . Lang . isObject ( node2 ) ) { region = node2 ; } else { return false ; } if ( all ) { return ( r [ LEFT ] >= region [ LEFT ] && r [ RIGHT ] <= region [ RIGHT ] && r [ TOP ] >= region [ TOP ] && r [ BOTTOM ] <= region [ BOTTOM ] ) ; } else { off = getOffsets ( region , r ) ; if ( off [ BOTTOM ] >= off [ TOP ] && off [ RIGHT ] >= off [ LEFT ] ) { return true ; } else { return false ; } } }
Check if any part of this node is in the passed region
@method inRegion
@for DOM
@param {Object} node2 The node to get the region from or an Object literal of the region
$param {Boolean} all Should all of the node be inside the region
@param {Object} altRegion An object literal containing the region for this node if we already have the data (for performance i.e. DragDrop)
@return {Boolean} True if in region, false if not.
Check if any part of this node is in the passed region