浏览代码

fixed issue with contentArea not resizing when width or height is changed

Adam Bowman 8 年之前
父节点
当前提交
71287552e0
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      canvas2D/src/Engine/babylon.group2d.ts

+ 2 - 0
canvas2D/src/Engine/babylon.group2d.ts

@@ -134,6 +134,8 @@
                 rd._noResizeOnScale = (this.cacheBehavior & Group2D.GROUPCACHEBEHAVIOR_NORESIZEONSCALE) !== 0;                
             }
             this.size = size;
+            //set actualSize to null so that changing width and height will change contentArea
+            this._actualSize = null;
             this._viewportPosition = Vector2.Zero();
             this._viewportSize = Size.Zero();
         }