diff --git a/src/core/display/Container.js b/src/core/display/Container.js index 5968e9e..3400b98 100644 --- a/src/core/display/Container.js +++ b/src/core/display/Container.js @@ -274,9 +274,9 @@ { this.removeChild( arguments[i] ); } - } + } else - { + { var index = this.children.indexOf(child); if (index === -1) @@ -440,9 +440,11 @@ continue; } - childVisible = true; - childBounds = this.children[i].getBounds(); + if (childBounds === math.Rectangle.EMPTY) { + continue; + } + childVisible = true; minX = minX < childBounds.x ? minX : childBounds.x; minY = minY < childBounds.y ? minY : childBounds.y; @@ -456,7 +458,8 @@ if (!childVisible) { - return math.Rectangle.EMPTY; + this._currentBounds = math.Rectangle.EMPTY; + return this._currentBounds; } var bounds = this._bounds;