flackr / scroll-timeline

A polyfill of ScrollTimeline.
Apache License 2.0
887 stars 82 forks source link

Fix regression due to handling of normal range #234

Closed johannesodland closed 4 months ago

johannesodland commented 4 months ago

Fix regression due to https://github.com/flackr/scroll-timeline/pull/223

We should return normal as the default range start and end, but the parsing still expects a TimelineRangeOffset which can cause an issue.

Fixing the issue by only returning normal when no range was set by the user, keeping the TimelineRangeOffset from getNormalStart/EndRange otherwise.

There's already a todo to handle the full syntax later.

johannesodland commented 4 months ago

@bramus Do you have time to review this?

bramus commented 4 months ago

Merged it in.

Besides the current TODO’s for this code, passing in explicit normal values also doesn’t work properly. I have filed https://github.com/flackr/scroll-timeline/issues/236 for this.