Hi guys,Is it possible to have two scroll components in the same prototype? I'm not sure how to define them separately. Any suggestions please?
# overview - scrolling contentscroll = ScrollComponent.wrap(demo.content)scroll.scrollHorizontal = false
# overview2 - scrolling contentscroll2 = ScrollComponent.wrap(demo.content)scroll2.scrollHorizontal = false
Yep: scroll2 = scroll.copy(). You can edit the properties of the copy like this: scroll2.props = x: 200, y: 100 etc
Thanks Balraj, does this work when the content is different for each? That is what I am hoping to achieve.
Based on your original post, I assumed that you wanted to make a direct copy as you wrapped the same content in 2 different components.
You can create as many scroll components as you want with different content by either doing what you've posted above or using a loop.
Ah I see. Can I use a different name for the layergroup instead of 'content' each time. eg. content2? Balraj chana
Sure! As many as you want: http://share.framerjs.com/kb63mr7tvg0t/