Showing
1 changed file
with
4 additions
and
1 deletions
| @@ -148,6 +148,7 @@ export struct PlayerTitleView { | @@ -148,6 +148,7 @@ export struct PlayerTitleView { | ||
| 148 | 148 | ||
| 149 | private updateSummaryLines() { | 149 | private updateSummaryLines() { |
| 150 | this.summaryLines = Math.max(1, 4 - this.titleLines) | 150 | this.summaryLines = Math.max(1, 4 - this.titleLines) |
| 151 | + // console.info(`cj2024 titleLines = ${this.titleLines}`) | ||
| 151 | this.isOverLines = this.summary.length > this.clipText(this.summary, 14, this.summaryLines, this.windowWidth - 150 - vp2px(50)).length | 152 | this.isOverLines = this.summary.length > this.clipText(this.summary, 14, this.summaryLines, this.windowWidth - 150 - vp2px(50)).length |
| 152 | } | 153 | } |
| 153 | 154 | ||
| @@ -306,7 +307,9 @@ export struct PlayerTitleView { | @@ -306,7 +307,9 @@ export struct PlayerTitleView { | ||
| 306 | } | 307 | } |
| 307 | } | 308 | } |
| 308 | .onAreaChange((oldArea: Area, newArea: Area) => { | 309 | .onAreaChange((oldArea: Area, newArea: Area) => { |
| 309 | - this.titleLines = Math.ceil((newArea.height as number) / 20) // 20是行高 | 310 | + //console.info(`cj2024 titleLines = ${newArea.height as number} line = ${(newArea.height as number) / 20}`) |
| 311 | + this.titleLines = Math.floor((newArea.height as number) / 20)// 20是行高 | ||
| 312 | + //console.info(`cj2024 titleLines = ${this.titleLines}`) | ||
| 310 | this.updateSummaryLines() | 313 | this.updateSummaryLines() |
| 311 | }) | 314 | }) |
| 312 | .padding({ | 315 | .padding({ |
-
Please register or login to post a comment