Verticall scroll navigation and fix (#200)

* Remove scroll tracking from Page component

* Replace initial scrolling trigger with initialPage prop to be more clear on when to scroll to inital page

* Add current page tracking back to HorizontalPager

* Memoize prevChapter and nextChapter functions

* Rewrite navigation in vertical pager to scroll by screen percentage instead of whole pages, refactor code

* Handle last pages explicitly to fix issue with small last pages
This commit is contained in:
Valter Martinek
2022-11-24 21:05:05 +01:00
committed by GitHub
parent 31a3679e06
commit 7aa4d2f3de
7 changed files with 172 additions and 134 deletions

View File

@@ -65,7 +65,6 @@ export default function DoublePagedPager(props: IReaderProps) {
index={curPage}
src={(pagesDisplayed.current === 1) ? pages[curPage].src : ''}
onImageLoad={() => {}}
setCurPage={setCurPage}
settings={settings}
/>,
document.getElementById('display'),