fix: 클릭 이벤트로 페이지 전환 기능 개선

This commit is contained in:
monoid 2025-10-18 02:21:42 +09:00
parent 4dc2ee0cab
commit e2c451c708

View file

@ -76,7 +76,7 @@ function ComicViewer({
return (
<div className="overflow-hidden w-full h-dvh relative">
<div className="absolute left-0 w-1/2 h-full z-10 select-none" onPointerDown={() => pageDown(1)} />
<div className="absolute left-0 w-1/2 h-full z-10 select-none" onClick={() => pageDown(1)} />
<img
className={cn("max-w-full max-h-full top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 absolute",
fade ? "opacity-70 transition-opacity duration-300 ease-in-out" : "opacity-100"
@ -84,7 +84,7 @@ function ComicViewer({
src={src}
alt="main content"
/>
<div className="absolute right-0 w-1/2 h-full z-10 select-none" onPointerDown={() => pageUp(1)} />
<div className="absolute right-0 w-1/2 h-full z-10 select-none" onClick={() => pageUp(1)} />
{curPage + 1 < totalPage && (
<img src={makeSrc(curPage + 1)} alt="next page" className="sr-only" />
)}