Construct a notebook windowed list model.
Optional
options: WindowedList.IModelOptionsProtected
_estimatedDefault widget size estimation
Protected
_stateProtected
cellsCell size estimator
Cell index
Cell height in pixels
Static
DEFAULT_Default cell margin (top + bottom)
Static
DEFAULT_Default cell height
Static
DEFAULT_Default editor line height
List widget height
List widget height
Test whether the model is disposed.
Items list to be rendered
Items list to be rendered
Number of widgets to render in addition to those visible in the viewport.
Number of widgets to render in addition to those visible in the viewport.
Viewport scroll offset.
Viewport scroll offset.
A signal emitted when any model state changes.
Total number of widgets in the list
Total number of widgets in the list
Whether windowing is active or not.
This is true by default.
Whether windowing is active or not.
Get the scroll offset to display an item in the viewport.
By default, the list will scroll as little as possible to ensure the item is visible. You can control the alignment of the item though by specifying a second alignment parameter. Acceptable values are:
auto (default) - Scroll as little as possible to ensure the item is visible. (If the item is already visible, it won't scroll at all.) smart - If the item is already visible (including the margin), don't scroll at all. If it is less than one viewport away, scroll so that it becomes visible (including the margin). If it is more than one viewport away, scroll so that it is centered within the list. center - Center align the item within the list. end - Align the item to the end of the list start - Align the item to the beginning of the list
Item index
Optional
align: ScrollToAlignWhere to align the item in the viewport
Optional
margin: numberIn 'smart' mode the viewport proportion to add
The needed scroll offset
Compute the items range to display.
It returns null
if the range does not need to be updated.
The current items range to display
Return the viewport top position and height for range spanning from
startIndex
to stopIndex
.
First item in viewport index
Last item in viewport index
The viewport top position and its height
Protected
onCallback on list changes
List items
List change
WindowedListModel caches offsets and measurements for each index for performance purposes. This method clears that cached data for all items after (and including) the specified index.
The list will automatically re-render after the index is reset.
Generated using TypeDoc
Notebook view model for the windowed list.