This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Brent Riddell
Posted Jun 23 - Read on Facebook

Whenever I animate a ScrollComponent, like its position on the screen, eg if i have a scrollable layer off-screen initially, then once something is clicked its moved onscreen, the scrolling no longer works, is there something i need to do here to reset the component? I tired .updateContent() but that seems to have no effect :/


Benjamin Den Boer

Heya Brent Riddell — hmm, do you have an example to illustrate? It sounds like the content animating on-screen may not be placed within the scroll.content layer, perhaps?

Brent Riddell

for those interested: I solved it using animations, instead of states, and on the onAnimationEnd event i could call updateContent() ... I also had to set the scroll.content height to be the same as the scroll height for some reason ... so don't fully understand why this works or why it's needed or all that, but it seems to work now :)

Douwe Homans

Brent Riddell, Benjamin Den Boer, I looked into this out of curiosity. It seems that indeed returning it to 'default'-state brakes the scroll-functionality. I think it has something to do with the uncertain z-Index after doing 3d translations.

It seems that toggling it back to default state has some unclear side-effects (i.e, it's manipulating things not made explicit in a state declaration: what is 'default'?)

A work-around; make all states (and properties) explicit and then toggle between those states: see:

Read the entire post on Facebook