Skip to content

Commit

Permalink
Merge pull request #45 from basementstudio/mati/timeline-events-update
Browse files Browse the repository at this point in the history
Update events
  • Loading branch information
matiasperz authored Aug 17, 2023
2 parents a9b1fab + 2c8594d commit 6ab04d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scrollytelling/src/primitive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ const Scrollytelling = ({
defaults: { ...defaults, duration: 1 },
});

tl.eventCallback("onUpdate", () => {
internalEventEmmiter.emit("timeline:update", tl);
});

setTimeline(tl);

return () => {
Expand Down Expand Up @@ -157,7 +161,7 @@ const Scrollytelling = ({
}

const cleanup = addRestToTimeline(end, timeline);
internalEventEmmiter.emit("timeline-update", timeline);
internalEventEmmiter.emit("timeline:refresh", timeline);

return {
duration,
Expand Down

1 comment on commit 6ab04d9

@vercel
Copy link

@vercel vercel bot commented on 6ab04d9 Aug 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.