Closed tarsisexistence closed 6 months ago
@dkaoster, I wonder whether we should adjust anything else here?
And I should probably add the support for callbacks of other implementations (like Svelte)
@dkaoster I decided to support videoPercentage
on instance as well. So if videoPercentage
is changed with enabled trackScroll
- we prefer setPercentage
instead of setTargetTimePercent
I did the same for Svelte and Vue. I need help to validate them. I would appreciate your review.
This PR addresses this issue https://github.com/dkaoster/scrolly-video/issues/89.
By design, I add a new callback that replaces
setTargetTimePercent
because it manipulates withcurrentTime
which doesn't have a sync with a scroll position (described in issue #89).So, here we
scroll
listener of handlerupdateScrollPercentage
that usessetTargetTimePercent
under the hoodsetTargetTimePercent
for non-trackScroll implementation (even though now it's possible to enable both at the same time)setPercentage
in conjunction withtrackScroll
, so here we unlock the possibility to use track scroll and programmatic scroll in the same flow.