优化
This commit is contained in:
@@ -446,7 +446,10 @@ class TextChapterLayout(
|
||||
val textLine = TextLine(isTitle = isTitle)
|
||||
if (durY + textHeight > visibleHeight) {
|
||||
val textPage = pendingTextPage
|
||||
textPage.height = textPage.lines.lastOrNull()?.lineBottom ?: 0f
|
||||
val height = textPage.lines.lastOrNull()?.lineBottom ?: 0f
|
||||
if (textPage.height < height) {
|
||||
textPage.height = height
|
||||
}
|
||||
if (doublePage && absStartX < viewWidth / 2) {
|
||||
//当前页面左列结束
|
||||
textPage.leftLineSize = textPage.lineSize
|
||||
@@ -528,8 +531,9 @@ class TextChapterLayout(
|
||||
val textPage = pendingTextPage
|
||||
textPage.addLine(textLine)
|
||||
durY += textHeight * lineSpacingExtra
|
||||
if (textPage.height < durY) {
|
||||
textPage.height = durY
|
||||
val height = textPage.lines.lastOrNull()?.lineBottom ?: 0f
|
||||
if (textPage.height < height) {
|
||||
textPage.height = height
|
||||
}
|
||||
}
|
||||
durY += textHeight * paragraphSpacing / 10f
|
||||
|
||||
Reference in New Issue
Block a user