Explorar o código

Merge pull request #2267 from abow/canvas2DFixes

fixes #1941 - alignment when using designSize
David Catuhe %!s(int64=8) %!d(string=hai) anos
pai
achega
aee09200cd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      canvas2D/src/Engine/babylon.canvas2d.ts

+ 1 - 1
canvas2D/src/Engine/babylon.canvas2d.ts

@@ -1542,7 +1542,7 @@
             }
 
             // If the canvas fit the rendering size and it changed, update
-            if (renderingSizeChanged && this._fitRenderingDevice) {
+            if (!this._designSize && renderingSizeChanged && this._fitRenderingDevice) {
                 this.size = this._renderingSize.clone();
                 if (this._background) {
                     this._background.size = this.size;