@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
70 lines • 1.93 kB
TypeScript
export namespace AlignmentOption {
let Start: string;
let Center: string;
let End: string;
}
export default VirtualListView;
declare class VirtualListView extends View<HTMLElement> {
/**
* @template T
* @param {List.<T>} list
* @param {number} [lineSize=20]
* @param {number} [lineSpacing=0]
* @param {function(element:T, index:number):View} elementFactory
* @param classList
* @param {number} [cacheSize=1000]
* @param {AlignmentOption} [verticalAlignment]
* @constructor
*/
constructor(list: List<T>, { lineSize, lineSpacing, elementFactory, classList, cacheSize, verticalAlignment }?: number);
data: List<T>;
el: Element;
renderedViews: List<any>;
__v_scroll_area: View<HTMLElement>;
__first_visible_line: number;
__last_visible_line: number;
__is_scroll_bar_visible: boolean;
/**
*
* @type {number}
* @private
*/
private __line_size;
/**
*
* @type {number}
* @private
*/
private __line_spacing;
/**
*
* @type {function(T, number): View}
* @private
*/
private __element_factory;
/**
*
* @type {AlignmentOption}
* @private
*/
private __alignment_vertical;
__index_cache: Cache<import("../../core/cache/Cache.js").Hashable, any>;
__throttledUpdate: Function;
__handleElementAdded(el: any, index: any): void;
__handleElementRemoved(el: any, index: any): void;
update(): void;
__obtainElementView(index: any): any;
/**
*
* @param {number} index
* @returns {number}
* @private
*/
private __computeElementYPosition;
__setScrollBar(flag: any): void;
scrollToEnd(): void;
}
import View from '../View.js';
import List from '../../core/collection/list/List.js';
import { Cache } from "../../core/cache/Cache.js";
//# sourceMappingURL=VirtualListView.d.ts.map