Преглед на файлове

Merge pull request #2267 from abow/canvas2DFixes

fixes #1941 - alignment when using designSize
David Catuhe преди 8 години
родител
ревизия
aee09200cd
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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;