ListViewOptions
Defined in: ui/collection/list-view.ts:14
Type Parameters
Section titled “Type Parameters”T = unknown
Properties
Section titled “Properties”dataSource
Section titled “dataSource”dataSource:
DataSource<T>
Defined in: ui/collection/list-view.ts:18
layout
Section titled “layout”layout:
LayoutProvider
Defined in: ui/collection/list-view.ts:19
onItemBound?
Section titled “onItemBound?”
optionalonItemBound?: (entity,data,index) =>void
Defined in: ui/collection/list-view.ts:37
Called after each bind, useful for ad-hoc per-item tweaks.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
T
number
Returns
Section titled “Returns”void
parent
Section titled “parent”parent:
number
Defined in: ui/collection/list-view.ts:17
Entity that hosts the scrolling content (items are parented here).
placeItem?
Section titled “placeItem?”
optionalplaceItem?: (world,entity,rect,index) =>void
Defined in: ui/collection/list-view.ts:35
Override how an item entity is positioned for its computed rect.
Default writes Transform.position = (centerX, -centerY, 0) so the
item’s center lands on the layout rect center in a y-up world.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
Rect
number
Returns
Section titled “Returns”void
recycleBuffer?
Section titled “recycleBuffer?”
optionalrecycleBuffer?:number
Defined in: ui/collection/list-view.ts:29
Extra index count kept mounted on each side of the strict visible range.
Default 2. For grid layouts set this to columns * 2 or similar for
row-level padding.
setVisible?
Section titled “setVisible?”
optionalsetVisible?: (world,entity,visible) =>void
Defined in: ui/collection/list-view.ts:39
Toggle visibility on pool acquire/release. Forwarded to ViewPool.
Parameters
Section titled “Parameters”entity
Section titled “entity”number
visible
Section titled “visible”boolean
Returns
Section titled “Returns”void
templates
Section titled “templates”templates:
Record<string,ListViewItemTemplate<T>>
Defined in: ui/collection/list-view.ts:23
Map of item type → template; every getItemType(i) result must have a match.
viewportSize
Section titled “viewportSize”viewportSize:
Vec2
Defined in: ui/collection/list-view.ts:21
Size of the visible window into the content, in content-local units.
world:
World
Defined in: ui/collection/list-view.ts:15