Royi Bernthal 7 年之前
父节点
当前提交
d046215003
共有 1 个文件被更改,包括 6 次插入3 次删除
  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);*/
         }
     }
 }