Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose canScroll states in PDFReaderState #49

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JBayangosB
Copy link
Contributor

Small change to PDFReaderState that exposes the canScrollForward and canScrollBackyard properties from pagerState for HorizontalPDFReaderState and lazyListState for VerticalPDFReaderState.

This is particular useful for supporting this issue: #45 as the currentPage property would lead to strange scenarios depending on device size, when used to decide if the PDF reader was scrolled to the bottom or top.

Large.font.mp4

@JBayangosB JBayangosB changed the title Jbb/expose can scroll states Expose canScroll states in PDFReaderState Aug 24, 2023
@JBayangosB JBayangosB changed the base branch from develop to master August 24, 2023 03:51
@JBayangosB
Copy link
Contributor Author

JBayangosB commented Aug 24, 2023

Changed branch to merge into master as it appeared develop was out of date. Feel free to adjust if needed!

Unfortunately the pagerState properties that make the most sense for canScrollForward/Backward are currently hardcoded to true and offer no value. Using logic based on record current page and page count instead for the time being with comments explaining the weirdness.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants