How do you go about tracking animation events on PageComponent.snapToPage()?
Have you tried:PageComponent.on "change:currentPage"
Yeah. It unfortunately fires right at the beginning of the transition.
You want to trigger something at the end of the transition?
Yes'ir. It's proving to be slightly difficult to do properly, and i'd like to not have to resort to a timeout.
PageComponent extends the ScrollComponent, so its events may work. Have you tried Events.ScrollAnimationDidEnd or Events.AnimationEnd?
Good point. Let me give it a try and report back.
So it doesn't appear that page snaps fire scroll events. However, if you access PageComponent.content.animations() it will give you a list of the animations to listen for events on.
In my case, there will only ever be a single animation queued, so I can rely on that no problem. It'd be convenient in the future to be able to listen for the transition event directly on the page component itself, though.
Had the same problem last week, I ended up using a time out.