This commit is contained in:
User
2025-01-21 19:57:07 -05:00
parent befc90dd02
commit d9f57e4e86
17 changed files with 206 additions and 230 deletions

View File

@@ -137,7 +137,7 @@ export default function Read({ auth, comic, chapter, chapters }) {
if (img.innerKey === 0 && chapter.chapter.prev) {
router.visit(route('comics.read', [comic.comic.path_word, chapter.chapter.prev]));
} else {
document.getElementById(`image-${img.innerKey - 1}`)?.scrollIntoView();
document.getElementById(`image-${ img.innerKey - 1 }`)?.scrollIntoView();
}
}
@@ -145,7 +145,7 @@ export default function Read({ auth, comic, chapter, chapters }) {
if (img.innerKey >= chapter.sorted.length - 1 && chapter.chapter.next) {
router.visit(route('comics.read', [comic.comic.path_word, chapter.chapter.next]));
} else {
document.getElementById(`image-${img.innerKey + 1}`)?.scrollIntoView();
document.getElementById(`image-${ img.innerKey + 1 }`)?.scrollIntoView();
}
}
@@ -370,7 +370,7 @@ export default function Read({ auth, comic, chapter, chapters }) {
<Head>
<title>{ chapter.chapter.name.concat(" - ", comic.comic.name) }</title>
</Head>
<div className="p-3 pt-1 pb-1 flex flex-wrap justify-center" id="mvp" ref={ ref }
<div className="p-3 pt-1 pb-1 flex flex-wrap justify-center" id="mvp" ref={ ref } scroll-region="true"
style={{ overflowAnchor: "none", height: "calc(100dvh - 90px)", overflowY: "scroll" }}>
{ chapter.sorted.map((img, j) => <ImageForComic key={ j } innerKey={ j } { ...img } />) }
</div>