kindoflew / svelte-parallax

a (small) spring-based parallax component library for Svelte
MIT License
145 stars 5 forks source link

Add external store support #35

Closed annie444 closed 1 year ago

annie444 commented 1 year ago

When using the AppShell from SkeletonLabs UI library, the svelte:window element doesn't log the scrollY position due to a bug.

To circumnavigate this, I moved the scroll binding from the svelte:window component to a vanilla event listener on the window. I also added a scroll prop so users can pass in a store bound to the scroll position and use that for the parallax effects.

annie444 commented 1 year ago

Okay upon running further tests, this approach won't work. I will resubmit once I have a working functionality.