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:
layer.superLayer = ""layer.height = BiggerHeightlayer.superLayer = scroll.content
You can call scroll.updateContent() to recalculate the width/height.
Thanks Joshua! I had a related question about scrolling as well. Can we enable the normal bounce and overdrag with 'mouseWheelEnabled = true'?
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