new MultiPassRenderer()
This control manage multi-pass rendering for improving performances when showing a list of items. The renderer will render "shells" for the items to enable page layout, and render items content on demand, or when items scrolls to view.
Members
-
multipass :String
-
kind of multipass, can be 'section', or 'item'
Type:
- String
-
orientation :String
-
could be 'vertical' or 'horizontal'
Type:
- String
-
scrollContainer :HTMLElement
-
Element containing scroll. If scrollContainer is filled, items content will get rendered when coming into view
Type:
- HTMLElement
-
tolerance :number
-
tolerance for determining if the rendering should apply. Tolerance is expressed in scroll container proportion. For example, 1 means that tolerance is equal to scroll container size
Type:
- number
-
virtualize :boolean
-
indicate if renderer empty items out of sight
Type:
- boolean
Methods
-
checkRendering()
-
check rendering of items, based on multipass configuration (force items on screen to render)
-
clearOffsets()
-
Clear cached offsets for bloc and for items
-
prepareItems(items, renderOptions)
-
render items shells to the page
Parameters:
Name Type Description items
Array array of items to render
renderOptions
Object options for rendering items, can override control options like item template
-
refreshScrollEvents()
-
refresh scroll events associated to multi pass renderer
-
renderItemsContent()
-
force rendering of all unrendered items
-
updateLayout()
-
update ui related properties like cached offsets, scroll events, ...