vue-waterfall-ex
Version:
32 lines (31 loc) • 1.01 kB
TypeScript
import Section from "./Section";
interface CellMetadatumObj {
_x: number;
_y: number;
_width: number;
_height: number;
}
export default class SectionManager {
private _cellMetadata;
private _sectionSize;
private _sections;
constructor(sectionSize?: number);
registerCell({ cellMetadatum, index }: {
cellMetadatum: CellMetadatumObj;
index: number;
}): void;
freezeCells(): void;
/** Get all Sections overlapping the specified region. */
getSections({ _height, _width, _x, _y }: CellMetadatumObj): Section[];
/** Total number of Sections based on the currently registered cells. */
getTotalSectionCount(): number;
/**
* Gets all cell indices contained in the specified region.
* A region may encompass 1 or more Sections.
*/
getCellIndices({ _height, _width, _x, _y }: CellMetadatumObj): number[];
getCellMetadata(index: number): {
[key: string]: any;
};
}
export {};