Closed johannesodland closed 5 months ago
The progress demo is currently throwing a "TypeError: Invalid ScrollTimeline Source Type".
This happens because
parseAnonymousScrollTimeline()
getAnonymousSourceElement()
Adding 'nearest' as a default anonymous source in getAnonymousScrollTimelineOptions(), the same place a default value for axis is set.
getAnonymousScrollTimelineOptions()
axis
https://github.com/flackr/scroll-timeline/blob/db93642a02f0271c2a96a1f15861d04813b67b10/src/scroll-timeline-css-parser.js#L465-L481
https://github.com/flackr/scroll-timeline/blob/db93642a02f0271c2a96a1f15861d04813b67b10/src/scroll-timeline-css-parser.js#L117-L129
https://github.com/flackr/scroll-timeline/blob/db93642a02f0271c2a96a1f15861d04813b67b10/src/scroll-timeline-base.js#L493-L504
The progress demo is currently throwing a "TypeError: Invalid ScrollTimeline Source Type".
This happens because
parseAnonymousScrollTimeline()
does not set a default sourcegetAnonymousSourceElement()
requires a source, and will throw an error if one is not set.Adding 'nearest' as a default anonymous source in
getAnonymousScrollTimelineOptions()
, the same place a default value foraxis
is set.https://github.com/flackr/scroll-timeline/blob/db93642a02f0271c2a96a1f15861d04813b67b10/src/scroll-timeline-css-parser.js#L465-L481
https://github.com/flackr/scroll-timeline/blob/db93642a02f0271c2a96a1f15861d04813b67b10/src/scroll-timeline-css-parser.js#L117-L129
https://github.com/flackr/scroll-timeline/blob/db93642a02f0271c2a96a1f15861d04813b67b10/src/scroll-timeline-base.js#L493-L504