forcedotcom / scrollerjs

A JavaScript library that helps you build performant UI components for the web.
http://scrollerjs.com
Apache License 2.0
636 stars 63 forks source link

Surfaces dom entries are created for every row! #35

Closed JeremyColton closed 6 years ago

JeremyColton commented 7 years ago
  1. Is there a way to set the max number of 'surface' divs in the viewport? Eg +1 top/bottom just outside the viewport. Currently, I see 6 additional non-viewable 'surface' divs created which are not needed.

  2. In your youtube video, how are you adding rows to the Scroller object - via window.scroller.prependItems() ?

Many thanks

diervo commented 6 years ago

Sorry for the loong delay in the response, this project its been in stand by mode for a while.

  1. The surfaces are calculated based on the available viewport area.
  2. Yes in the examples you can find the exact code.