0.1.4
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user