Reference home > @af-utils/virtual-core > VirtualScroller > getOffset

VirtualScroller.getOffset() method

Get pixel offset by item index;

Signature:

getOffset(index: number): number;

Parameters

Parameter

Type

Description

index

number

Item index. Must be <= itemCount

Returns

number

Pixel offset

Remarks

Possible offset range: 0 <= N <= scrollSize. Time complexity: O(log2(itemCount))