|
|
@ -106,19 +106,17 @@ class SimulationPageDelegate(pageView: PageView) : HorizontalPageDelegate(pageVi |
|
|
|
override fun setDirection(direction: Direction) { |
|
|
|
override fun setDirection(direction: Direction) { |
|
|
|
super.setDirection(direction) |
|
|
|
super.setDirection(direction) |
|
|
|
when (direction) { |
|
|
|
when (direction) { |
|
|
|
Direction.PREV -> { |
|
|
|
Direction.PREV -> |
|
|
|
//上一页滑动不出现对角 |
|
|
|
//上一页滑动不出现对角 |
|
|
|
if (startX > viewWidth / 2.0) { |
|
|
|
if (startX > viewWidth / 2.0) { |
|
|
|
calcCornerXY(startX, viewHeight.toFloat()) |
|
|
|
calcCornerXY(startX, viewHeight.toFloat()) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
calcCornerXY(viewWidth - startX, viewHeight.toFloat()) |
|
|
|
calcCornerXY(viewWidth - startX, viewHeight.toFloat()) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Direction.NEXT -> |
|
|
|
Direction.NEXT -> { |
|
|
|
|
|
|
|
if (viewWidth / 2.0 > startX) { |
|
|
|
if (viewWidth / 2.0 > startX) { |
|
|
|
calcCornerXY(viewWidth - startX, startY) |
|
|
|
calcCornerXY(viewWidth - startX, startY) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else -> Unit |
|
|
|
else -> Unit |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|