Skip to content

Commit

Permalink
Fix tap control area shifting after zooming out (#767)
Browse files Browse the repository at this point in the history
  • Loading branch information
FooIbar authored May 7, 2024
1 parent 1df87ea commit 8e9396a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class WebtoonViewer(val activity: ReaderActivity, val isContinuous: Boolean = tr
recycler.getLocationInWindow(viewPositionRelativeToWindow)
val pos = PointF(
(event.rawX - viewPosition[0] + viewPositionRelativeToWindow[0]) / recycler.width,
(event.rawY - viewPosition[1] + viewPositionRelativeToWindow[1]) / recycler.height,
(event.rawY - viewPosition[1] + viewPositionRelativeToWindow[1]) / recycler.originalHeight,
)
when (config.navigator.getAction(pos)) {
NavigationRegion.MENU -> activity.toggleMenu()
Expand Down

0 comments on commit 8e9396a

Please sign in to comment.