Royi Bernthal 7 năm trước cách đây
mục cha
commit
d046215003
1 tập tin đã thay đổi với 6 bổ sung3 xóa
  1. 6 3
      gui/src/controls/textBlock.ts

+ 6 - 3
gui/src/controls/textBlock.ts

@@ -215,12 +215,15 @@ module BABYLON.GUI {
             }
 
             if (this._resizeToFit) {
-                this.width = 100 + 'px'; //maxLineWidth + 'px';
+                this.width = maxLineWidth + 'px';
                 this.height = this._fontOffset.height * this._lines.length + 'px';
             }
 
-            console.log('width', maxLineWidth);
-            console.log('height', this._fontOffset.height * this._lines.length);
+            console.log('width', this.width);
+            console.log('height', this.height);
+
+            /*console.log('width', maxLineWidth);
+            console.log('height', this._fontOffset.height * this._lines.length);*/
         }
     }
 }