Skip to content

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

Open
@nico-heinrich

Description

@nico-heinrich

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions