mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix(reader/webtoon): Fix tap control area shifting after zooming out
This commit is contained in:
parent
33e22b8aee
commit
938489d0e0
2 changed files with 3 additions and 2 deletions
|
@ -27,7 +27,8 @@ open class WebtoonRecyclerView @JvmOverloads constructor(
|
|||
private var atFirstPosition = false
|
||||
private var halfWidth = 0
|
||||
private var halfHeight = 0
|
||||
private var originalHeight = 0
|
||||
var originalHeight = 0
|
||||
private set
|
||||
private var heightSet = false
|
||||
private var firstVisibleItemPosition = 0
|
||||
private var lastVisibleItemPosition = 0
|
||||
|
|
|
@ -101,7 +101,7 @@ class WebtoonViewer(val activity: ReaderActivity, val hasMargins: Boolean = fals
|
|||
},
|
||||
)
|
||||
recycler.tapListener = f@{ event ->
|
||||
val pos = PointF(event.rawX / recycler.width, event.rawY / recycler.height)
|
||||
val pos = PointF(event.rawX / recycler.width, event.rawY / recycler.originalHeight)
|
||||
val navigator = config.navigator
|
||||
when (navigator.getAction(pos)) {
|
||||
ViewerNavigation.NavigationRegion.MENU -> activity.toggleMenu()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue