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

What is Framer? Join the Community
Return to index
Peter Gr
Posted Nov 29 - Read on Facebook

Does anyone know why a scroll component won't adjust when one of its layers' height is increased later on?

for example, this doesn't work:

scroll = new scrollComponent

layer = new Layer
_ height: Screen.height
_ superLayer: scroll.content

# ---- later ---- #

layer.height = BiggerHeight

I have to take it out of the scroll component, change the height and then re-add it to get it to work:

# ---- later ---- #

layer.superLayer = ""
layer.height = BiggerHeight
layer.superLayer = scroll.content

3 Comments

Joshua Tucker

You can call scroll.updateContent() to recalculate the width/height.

Peter Gr

Thanks Joshua! I had a related question about scrolling as well. Can we enable the normal bounce and overdrag with 'mouseWheelEnabled = true'?

Joshua Tucker

Great question, I don't think so. The overdrag and momentum is custom handling to create that "rubber banding" effect (it's not technically a scroll, it's a touchMove), whereas the mouse wheel is actually scrolling through layer. Perhaps there's some voodoo one could do with over scroll to make this happen? Jordan Robert Dobson

Read the entire post on Facebook