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

[scroll-animations-1] question about progress calculation for a View Timeline #9193

Open
ydaniv opened this issue Aug 15, 2023 · 2 comments
Open
Labels

Comments

@ydaniv
Copy link
Contributor

ydaniv commented Aug 15, 2023

In Calculating Progress for a View Progress Timeline the spec says:

Progress (the current time) in a view progress timeline is calculated as: distance ÷ range where:

  • distance is the current scroll offset minus the scroll offset corresponding to the start of the cover range

  • range is the scroll offset corresponding to the start of the cover range minus the scroll offset corresponding to the end of the cover range

So I could be wrong here, but seems to me that instead of using cover for defining distance and range, it should be something like the "effective range" start/end including start/end inset, for the corresponding start/end definitions above.

Perhaps that "effective range" can be the attachment range?

FYI @fantasai @flackr

@flackr
Copy link
Contributor

flackr commented Aug 15, 2023

A view timeline can have many animations using it. We can't derive the range for the timeline from the ranges on the individual animations which may differ and change as animations start/stop.

@ydaniv
Copy link
Contributor Author

ydaniv commented Aug 15, 2023

ah, right. So animation attachment is out.

Nevertheless, shouldn't we include insets there? Since they are in fact properties of the timeline itself?

@fantasai fantasai added the scroll-animations-1 Current Work label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants