Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tap control area shifting after zooming out #767

Merged
merged 1 commit into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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()