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

Right - Left swipe during the full size screen #44

Open
fujidaiti opened this issue Jun 15, 2023 Discussed in #43 · 2 comments
Open

Right - Left swipe during the full size screen #44

fujidaiti opened this issue Jun 15, 2023 Discussed in #43 · 2 comments
Labels
enhancement New feature or request

Comments

@fujidaiti
Copy link
Owner

Discussed in #43

Originally posted by VeskoDev June 14, 2023
First of all, I have to say that the package works perfectly, but what I need is a scroll system that works on the initial opening of the page view, which has a standard page view. My question is, what would be the easiest way and does this package provide the capability to scroll from page to page even though I'm on a full-size page?

@fujidaiti fujidaiti added the enhancement New feature or request label Jun 15, 2023
@fujidaiti fujidaiti assigned fujidaiti and unassigned fujidaiti Jun 15, 2023
@fujidaiti
Copy link
Owner Author

fujidaiti commented Jun 17, 2023

With the current implementation, there are 2 problems that must be solved before we can provide the option to always allow the pagination:

  • the snap effect is not smooth
  • Inconsistency of the scroll positions of each page

The former can be fixed by changing the way to calculate the visual positions of each page (see the working branch).

The later is, say, you vertically scroll certain pixels up the page A and horizontally swipe to the next page B keeping the vertical scroll position of A, then vertically scroll down B to the top to shrink the pages. If you horizontally swipe back to A, you should notice that the vertical scroll position of A is not at the top even though the pages have been fully shrunk (see the video at the bottom).
To solve this problem, it is necessary to synchronize (set to 0) the scroll position of all pages at some point, but it is not clear where this should be done. A naive idea is to reset the scroll positions to 0 when the pages are completely switched, but this solution has a downside that the scroll position is not preserved before and after switching pages.

2023-06-17.16.54.36.mov

@VeskoDev
Copy link

Maybe in this situation, we can have 2 controllers, one default with a default viewport fraction like 0.96 for example, and when the page is changed (we can use the built-in onPageChanged function) we can just switch to that default controller and that will reset and switch to default mode for viewport fraction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants