dist/melonjs.js
function updateChildBounds() {
         this.childBounds.pos.set(Infinity, Infinity);
         this.childBounds.resize(-Infinity, -Infinity);
         var childBounds;

         for (var i = this.children.length, child; i--, child = this.children[i];) {
           if (child.isRenderable) {
             if (child instanceof me.Container) {
               childBounds = child.childBounds;
             } else {
               childBounds = child.getBounds();
             } // TODO : returns an "empty" rect instead of null (e.g. EntityObject)
             // TODO : getBounds should always return something anyway


             if (childBounds !== null) {
               this.childBounds.union(childBounds);
             }
           }
         }

         return this.childBounds;
       }
function updateChildBounds() {
         this.childBounds.pos.set(Infinity, Infinity);
         this.childBounds.resize(-Infinity, -Infinity);
         var childBounds;

         for (var i = this.children.length, child; i--, child = this.children[i];) {
           if (child.isRenderable) {
             if (child instanceof me.Container) {
               childBounds = child.childBounds;
             } else {
               childBounds = child.getBounds();
             } // TODO : returns an "empty" rect instead of null (e.g. EntityObject)
             // TODO : getBounds should always return something anyway


             if (childBounds !== null) {
               this.childBounds.union(childBounds);
             }
           }
         }

         return this.childBounds;
       }
function updateChildBounds ( ) { this . childBounds . pos . set ( Infinity , Infinity ) ; this . childBounds . resize ( - Infinity , - Infinity ) ; var childBounds ; for ( var i = this . children . length , child ; i -- , child = this . children [ i ] ; ) { if ( child . isRenderable ) { if ( child instanceof me . Container ) { childBounds = child . childBounds ; } else { childBounds = child . getBounds ( ) ; } // TODO : returns an "empty" rect instead of null (e.g. EntityObject) // TODO : getBounds should always return something anyway if ( childBounds !== null ) { this . childBounds . union ( childBounds ) ; } } } return this . childBounds ; }
resizes the child bounds rectangle, based on children bounds.
@name updateChildBounds
@memberOf me.Container.prototype
@function
@return {me.Rect} updated child bounds
resizes the child bounds rectangle based on children bounds .