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

Way to get the amount that current page is in view #4311

Open
nico-heinrich opened this issue Feb 19, 2025 · 0 comments
Open

Way to get the amount that current page is in view #4311

nico-heinrich opened this issue Feb 19, 2025 · 0 comments

Comments

@nico-heinrich
Copy link

nico-heinrich commented Feb 19, 2025

I want to animate page content in and out based on the "in-view amount" of the page.

I know that f7 has an event that I can listen to: 'swipebackMove'. But it only returns the progress while the user actively swipes. When they let go, the animation breaks. I would like to get that decimal between 0 and 1 regardless of their swiping action.

My solution would be to listen to the position of the current page and its relation to the window's inner width. Not very elegant.

Also, one might not want the actual amount that page is in view, which works for iOS, but the animation progress (or 'transition progress'), as for MD, the distance that the page travels is way shorter.

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

No branches or pull requests

1 participant