callumacrae / transform-when

:film_strip: A library for handing animations combining page position and time

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

initialCheck?

corysimmons opened this issue · comments

Transforms and such aren't applied if you refresh. You have to scroll.

In your when-scroll lib, you have initialCheck for this.

what browser is this in? in chrome, it fires the scroll event on page load if the document isn't at the top

i agree that this would be a good change to make. i probably wouldn't make it an option though, i'd just make it happen automatically

Latest Chrome, Macbook
I'm using your lib within React and have an element rotated. When I refresh the page, it is unrotated.

yep, that shouldn't happen.

PR welcome, or I'll get around to looking at it at some point :)

Probably just gonna go with some ScrollMagic/GSAP 💩 for now, but if I find some time I'd like to fork your lib over to intuitive React components. If/when I do that, I'll add in this little bits and ping you.