Ver código fonte

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

Adam Bowman 8 anos atrás
pai
commit
71287552e0
1 arquivos alterados com 2 adições e 0 exclusões
  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();
         }