fix: toggle the menus on the whole screen when Click-To-Flip is disabled, closes #831 (#834)

This commit is contained in:
Huang Xin
2025-04-08 14:09:46 +08:00
committed by GitHub
parent b0cf087d78
commit bfcf89b093
@@ -43,7 +43,10 @@ export const useClickEvent = (
if (!consumed) {
const centerStartX = viewStartX + viewRect.width * 0.375;
const centerEndX = viewStartX + viewRect.width * 0.625;
if (screenX >= centerStartX && screenX <= centerEndX) {
if (
viewSettings.disableClick! ||
(screenX >= centerStartX && screenX <= centerEndX)
) {
// toggle visibility of the header bar and the footer bar
setHoveredBookKey(hoveredBookKey ? null : bookKey);
} else {