瀏覽代碼

Fix textblock bug

David Catuhe 6 年之前
父節點
當前提交
b4b418bc08
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      gui/src/2D/controls/textBlock.ts

+ 1 - 1
gui/src/2D/controls/textBlock.ts

@@ -439,7 +439,7 @@ export class TextBlock extends Control {
 
                 let newHeight = this.paddingTopInPixels + this.paddingBottomInPixels + this._fontOffset.height * lines.length;
 
-                if (this._lines.length > 0 && this._lineSpacing.internalValue !== 0) {
+                if (lines.length > 0 && this._lineSpacing.internalValue !== 0) {
                     let lineSpacing = 0;
                     if (this._lineSpacing.isPixel) {
                         lineSpacing = this._lineSpacing.getValue(this._host);