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

What is Framer? Join the Community
Return to index
YoungIm Jo
Posted Mar 15 - Read on Facebook

Hey guys - Have a question about ScrollComponent's scrollToLayer.

Let's just say I currently have four layers(layer1 at the very top, layer2, layer3, and layer4 at the very bottom) on scroll.content, and current scroll position is layer4.
When I try to append new child(layer5) to scroll.content(by addChild(layer5) and scroll.scrollToLayer(layer5), the scroll goes down from layer1 to layer5. What I'd like to make is just append layer5 and scroll from layer4 to layer5. Anybody has any idea how can I tackle down this problem?


YoungIm Jo

Currently I'm resolving this problem by saving current scrollY in a variable and after appending all the content I set scroll.scrollY as the variable, before calling scrollToLayer.

Read the entire post on Facebook