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

What is Framer? Join the Community
Return to index
Michael Dorian Bach
Posted Sep 09 - Read on Facebook

Was hoping someone can give me a little more insight into how the scrollComponent functions. Particularly how the content layer determines it's height.

scroller = ScrollComponent

Scroller is a fixed height. When you click a button, I add a new layer to scroller.content. Each new layer is placed below each other. I then make scroller.content.height taller by adding the height of the added layer to it. I then call the scroller scrollTo function and pass new the Y which is the height of scroller.content + the added layer height.

The problem I'm having is when I added a new layer to scroller.content the content shows up but

1. Both scrolling to the item programmatically or just dragging the scroller doesn't scroll to the newly added layer. You can see the top of the new layer but the component thinks that's the end. The rubber banding effect shows a cut off layer.

What is the proper way of scrolling to the end of the scroll component and getting the component know that the content layer is now larger due to a new layer.


Aalok Trivedi

Everytime you click the button you need to to scroller.updateContent()

Read the entire post on Facebook