David Catuhe преди 8 години
родител
ревизия
995114b573
променени са 3 файла, в които са добавени 5 реда и са изтрити 5 реда
  1. 2 2
      dist/preview release/gui/babylon.gui.js
  2. 1 1
      dist/preview release/gui/babylon.gui.min.js
  3. 2 2
      gui/src/controls/control.ts

+ 2 - 2
dist/preview release/gui/babylon.gui.js

@@ -738,6 +738,7 @@ var BABYLON;
                         return;
                     }
                     this._fontFamily = value;
+                    this._fontSet = true;
                 },
                 enumerable: true,
                 configurable: true
@@ -983,7 +984,7 @@ var BABYLON;
                 }
             };
             Control.prototype._applyStates = function (context) {
-                if (this._fontSet = true) {
+                if (this._fontSet) {
                     this._fontSet = false;
                     this._prepareFont();
                 }
@@ -1221,7 +1222,6 @@ var BABYLON;
                 }
                 this._font = this._fontSize.getValue(this._host) + "px " + this._fontFamily;
                 this._fontOffset = Control._GetFontOffset(this._font);
-                this._markAsDirty();
             };
             Object.defineProperty(Control, "HORIZONTAL_ALIGNMENT_LEFT", {
                 get: function () {

Файловите разлики са ограничени, защото са твърде много
+ 1 - 1
dist/preview release/gui/babylon.gui.min.js


+ 2 - 2
gui/src/controls/control.ts

@@ -232,6 +232,7 @@ module BABYLON.GUI {
             }
 
             this._fontFamily = value;
+            this._fontSet = true;
         }
 
         public get fontSize(): string | number  {
@@ -471,7 +472,7 @@ module BABYLON.GUI {
         }
 
         protected _applyStates(context: CanvasRenderingContext2D): void {
-            if (this._fontSet = true) {
+            if (this._fontSet) {
                 this._fontSet = false;
                 this._prepareFont();
             }
@@ -760,7 +761,6 @@ module BABYLON.GUI {
             this._font = this._fontSize.getValue(this._host) + "px " + this._fontFamily;
         
             this._fontOffset = Control._GetFontOffset(this._font);
-            this._markAsDirty();
         }
 
         // Statics