Explorar o código

Merge pull request #2269 from abow/canvas2DFixes

fixes #1929 - stops prim from drifting when animated and margin is no…
David Catuhe %!s(int64=8) %!d(string=hai) anos
pai
achega
1b39896670
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      canvas2D/src/Engine/babylon.prim2dBase.ts

+ 4 - 0
canvas2D/src/Engine/babylon.prim2dBase.ts

@@ -4146,6 +4146,10 @@
                         hasV = true;
                         setSize = true;
                     }
+                }else{
+                    //this prevents the prim from flying off the screen when margin is not set (bug #1929)
+                    this._marginOffset.x = 0;
+                    this._marginOffset.y = 0;
                 }
 
                 if (!hasH) {