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

What is Framer? Join the Community
Return to index
Eric Parren
Posted Jul 09 - Read on Facebook

When I use ScrollComponent.wrap() on a single layer it works. But, when I use it on a layer that has children it doesn't. (it also seems to collapse the wrapped layer in a strange way.) Why?

See without children: https://framer.cloud/qOmAn
And with children: https://framer.cloud/AKrxo

2 Comments

Eric Parren

anybody?

Jonas Treub

The wrap function indeed checks whether the layer has children. If so, it replaces the content layer of the component provided layer. When there are no children it adds the layer to the existing content layer. This logic was added to ease turning Sketch imports into scrollable layers. If you want more control its better to set up the scroll component yourself. Just add the layer by setting its parent to scroll.content

Read the entire post on Facebook