瀏覽代碼

fix broken playground

Trevor Baron 6 年之前
父節點
當前提交
eb98eb6d4e
共有 3 個文件被更改,包括 10 次插入2 次删除
  1. 8 1
      gui/src/2D/advancedDynamicTexture.ts
  2. 1 0
      gui/src/2D/controls/control.ts
  3. 1 1
      tests/validation/config.json

+ 8 - 1
gui/src/2D/advancedDynamicTexture.ts

@@ -317,8 +317,15 @@ export class AdvancedDynamicTexture extends DynamicTexture {
             func(child);
         }
     }
-     private _disableInvalidateRect = false;
+    private _disableInvalidateRect = false;
     private _invalidatedRectangle: Nullable<Measure> = null;
+    /**
+     * Invalidates a rectangle area on the gui texture
+     * @param minX left most position of the rectangle to invalidate in pixels
+     * @param minY top most position of the rectangle to invalidate in pixels
+     * @param maxX right most position of the rectangle to invalidate in pixels
+     * @param maxY bottom most position of the rectangle to invalidate in pixels
+     */
     public invalidateRect(minX: number, minY: number, maxX: number, maxY: number) {
         if (this._disableInvalidateRect) {
             return;

+ 1 - 0
gui/src/2D/controls/control.ts

@@ -1047,6 +1047,7 @@ export class Control {
 
         this._left.ignoreAdaptiveScaling = true;
         this._top.ignoreAdaptiveScaling = true;
+        this._markAsDirty();
     }
 
     /** @hidden */

+ 1 - 1
tests/validation/config.json

@@ -241,7 +241,7 @@
     },
     {
       "title": "Advanced shadows",
-      "renderCount": 2,
+      "renderCount": 20,
       "scriptToRun": "/Demos/AdvancedShadows/advancedShadows.js",
       "functionToCall": "CreateAdvancedShadowsTestScene",
       "referenceImage": "advancedShadows.png",