vue-waterfall-ex
Version:
31 lines (30 loc) • 914 B
TypeScript
/**
* A section of the Window.
* Window Sections are used to group nearby cells.
* This enables us to more quickly determine which cells to display in a given region of the Window.
* Sections have a fixed size and contain 0 to many cells (tracked by their indices).
*/
interface CellMetadatumObj {
_x: number;
_y: number;
_width: number;
_height: number;
}
export default class Section {
private height;
private width;
private x;
private y;
private _indexMap;
private _indices;
constructor({ _height, _width, _x, _y }: CellMetadatumObj);
/** Add a cell to this section. */
addCellIndex({ index }: {
index: number;
}): void;
/** Get all cell indices that have been added to this section. */
getCellIndices(): number[];
/** Intended for debugger/test purposes only */
toString(): string;
}
export {};