Merge pull request #2240 from 821938089/little-fix

修复仿真翻页点击时翻页动画异常
This commit is contained in:
kunfei
2022-09-05 08:56:58 +08:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -119,7 +119,7 @@ abstract class HorizontalPageDelegate(readView: ReadView) : PageDelegate(readVie
abortAnim()
if (!hasNext()) return
setDirection(PageDirection.NEXT)
readView.setStartPoint(viewWidth.toFloat(), 0f, false)
readView.setStartPoint(viewWidth.toFloat(), 1f, false)
onAnimStart(animationSpeed)
}
@@ -127,7 +127,7 @@ abstract class HorizontalPageDelegate(readView: ReadView) : PageDelegate(readVie
abortAnim()
if (!hasPrev()) return
setDirection(PageDirection.PREV)
readView.setStartPoint(0f, 0f, false)
readView.setStartPoint(0f, viewHeight.toFloat(), false)
onAnimStart(animationSpeed)
}

View File

@@ -189,7 +189,7 @@ class SimulationPageDelegate(readView: ReadView) : HorizontalPageDelegate(readVi
dx = if (mCornerX > 0 && mDirection == PageDirection.NEXT) {
-(viewWidth + touchX)
} else {
(viewWidth - touchX + viewWidth)
viewWidth - touchX
}
dy = if (mCornerY > 0) {
(viewHeight - touchY)