@@ -292,7 +292,7 @@ PIXI.DisplayObjectContainer.prototype.removeChildren = function(beginIndex, endI
292292 * @method updateTransform
293293 * @private
294294 */
295- PIXI . DisplayObjectContainer . prototype . updateTransform = function ( )
295+ PIXI . DisplayObjectContainer . prototype . updateTransform = function ( )
296296{
297297 if ( ! this . visible )
298298 {
@@ -322,16 +322,21 @@ PIXI.DisplayObjectContainer.prototype.displayObjectContainerUpdateTransform = PI
322322 * @param {PIXI.DisplayObject|PIXI.Matrix } [targetCoordinateSpace] Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.
323323 * @return {Rectangle } The rectangular bounding area
324324 */
325- PIXI . DisplayObjectContainer . prototype . getBounds = function ( targetCoordinateSpace )
325+ PIXI . DisplayObjectContainer . prototype . getBounds = function ( targetCoordinateSpace )
326326{
327327 var isTargetCoordinateSpaceDisplayObject = targetCoordinateSpace && targetCoordinateSpace instanceof PIXI . DisplayObject ;
328328 var isTargetCoordinateSpaceThisOrParent = true ;
329329
330- if ( ! isTargetCoordinateSpaceDisplayObject ) {
330+ if ( ! isTargetCoordinateSpaceDisplayObject )
331+ {
331332 targetCoordinateSpace = this ;
332- } else if ( targetCoordinateSpace instanceof PIXI . DisplayObjectContainer ) {
333+ }
334+ else if ( targetCoordinateSpace instanceof PIXI . DisplayObjectContainer )
335+ {
333336 isTargetCoordinateSpaceThisOrParent = targetCoordinateSpace . contains ( this ) ;
334- } else {
337+ }
338+ else
339+ {
335340 isTargetCoordinateSpaceThisOrParent = false ;
336341 }
337342
@@ -343,7 +348,8 @@ PIXI.DisplayObjectContainer.prototype.getBounds = function (targetCoordinateSpac
343348
344349 targetCoordinateSpace . worldTransform = PIXI . identityMatrix ;
345350
346- for ( i = 0 ; i < targetCoordinateSpace . children . length ; i ++ ) {
351+ for ( i = 0 ; i < targetCoordinateSpace . children . length ; i ++ )
352+ {
347353 targetCoordinateSpace . children [ i ] . updateTransform ( ) ;
348354 }
349355 }
@@ -383,7 +389,8 @@ PIXI.DisplayObjectContainer.prototype.getBounds = function (targetCoordinateSpac
383389
384390 var bounds = this . _bounds ;
385391
386- if ( ! childVisible ) {
392+ if ( ! childVisible )
393+ {
387394 bounds = new PIXI . Rectangle ( ) ;
388395
389396 var w0 = bounds . x ;
@@ -441,15 +448,18 @@ PIXI.DisplayObjectContainer.prototype.getBounds = function (targetCoordinateSpac
441448 bounds . width = maxX - minX ;
442449 bounds . height = maxY - minY ;
443450
444- if ( isTargetCoordinateSpaceDisplayObject ) {
451+ if ( isTargetCoordinateSpaceDisplayObject )
452+ {
445453 targetCoordinateSpace . worldTransform = matrixCache ;
446454
447- for ( i = 0 ; i < targetCoordinateSpace . children . length ; i ++ ) {
455+ for ( i = 0 ; i < targetCoordinateSpace . children . length ; i ++ )
456+ {
448457 targetCoordinateSpace . children [ i ] . updateTransform ( ) ;
449458 }
450459 }
451460
452- if ( ! isTargetCoordinateSpaceThisOrParent ) {
461+ if ( ! isTargetCoordinateSpaceThisOrParent )
462+ {
453463 var targetCoordinateSpaceBounds = targetCoordinateSpace . getBounds ( ) ;
454464
455465 bounds . x -= targetCoordinateSpaceBounds . x ;
@@ -481,10 +491,12 @@ PIXI.DisplayObjectContainer.prototype.contains = function (child) {
481491 if ( ! child )
482492 return false ;
483493
484- if ( child === this ) {
494+ if ( child === this )
495+ {
485496 return true ;
486497 }
487- else {
498+ else
499+ {
488500 return this . contains ( child . parent ) ;
489501 }
490502}
0 commit comments