animotionjs / animotion

🪄 Create beautiful presentations with Svelte
https://animotion.pages.dev
MIT License
1.38k stars 41 forks source link

Add focused callback to Transition/Action #37

Closed williamviktorsson closed 2 months ago

williamviktorsson commented 2 months ago

Suggested fix to #36

I've updated the template code as well so that each focused callback sets the state it wants to show on the screen, meaning that the state will be correct no matter the direction of navigation or if the page is reloaded.

This also allows for linking to a proper state in a slide.