Skip to content

[scroll-animations-1] Time being overall scroll proportion on ViewTimeline leads to complicated architecture #7312

@flackr

Description

@flackr

The ViewTimeline interface defines accessors for startTime and endTime. The definition of these accessors and currentTime says that they give the proportion of the overall scroll.

However, in order for the relative view position to map to animation progress, we would have to constantly adjust the startTime and duration of the animation to match the startTime and duration of the timeline. I think this would be very confusing for developers if the animation timing changed constantly based on layout, and would likely result in any specified timing getting out of sync with the view timeline range. I think we should be using percentages such that the start of a view timeline is always 0% and the end is always 100%.

We could still have accessors such as startScrollOffset and endScrollOffset which return offets in pixels, I would just propose that we don't have the output time offset and duration be affected by the layout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Commenter SatisfiedCommenter has indicated satisfaction with the resolution / edits.scroll-animations-1Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions