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

What is Framer? Join the Community
Return to index
Ruben Raditya
Posted Jul 13 - Read on Facebook

why scrollComponent doesn't work with more than 2 objects ? in my case, soon is a group on homescreen. but when i tried to type new scrollComponent for the next page "detail", the "page" page won't appear.. no errors found but the code was broke. any idea how to fix it?

9 Comments

Ray Alexander

give them unique names? also I think the sketch target layers need to be inside parentheses.

Ruben Raditya

unique name as in Utils.globalLayers sketch ..? I already wrote that to remove the way to type sketch in every layer.

and also i tried to parentheses those layer .. is scrollComponent.wrap only work for only one screen?

Ray Alexander

sorry

Ray Alexander

something like:

homescreenScroll = ScrollComponent.wrap(sketch.homescreen)
homescreenScroll.scrollVertical = true

Ray Alexander

and then:
soonScroll = ScrollComponent.wrap(sketch.soon)
soonScroll.scrollVertical = false
soonScroll.scrollHorizontal = true

Ray Alexander

and you should only need to specific which scroll position you want ot set ot false

Ray Alexander

by default they are both true

Ruben Raditya

thanks for reply Ray Alexander ..

Ray Alexander

no worries

Read the entire post on Facebook