Browse Source

Canvas2D provide method to compute the layout on demand

nockawa 9 years ago
parent
commit
4195d94dfc
1 changed files with 7 additions and 0 deletions
  1. 7 0
      src/Canvas2d/babylon.canvas2d.ts

+ 7 - 0
src/Canvas2d/babylon.canvas2d.ts

@@ -910,6 +910,13 @@
             }
         }
 
+        /**
+         * Call this method change you want to have layout related data computed and up to date (layout area, primitive area, local/global transformation matrices)
+         */
+        public updateCanvasLayout() {
+            this._updateCanvasState();
+        }
+
         private _updateCanvasState() {
             // Check if the update has already been made for this render Frame
             if (this.scene.getRenderId() === this._updateRenderId) {