cui-light
Version:
cUI light framework for the web
26 lines (25 loc) • 717 B
TypeScript
export interface CuiIntersectionResultItem {
verticalRatio: number;
horizontalRatio: number;
element: HTMLElement;
}
export interface CuiIntersectionListenerOptions {
threshold?: number;
}
export interface CuiIntersectionResult {
top: number;
left: number;
scrolling: boolean;
initial: boolean;
items: CuiIntersectionResultItem[];
source: string;
ev: Event | undefined;
}
export interface CuiIntersectionCallback {
(ev: CuiIntersectionResult): void;
}
export interface ICuiIntersectionCalculator {
setParent(element: HTMLElement): void;
setChildren(children: HTMLElement): void;
onUpdate(callback: CuiIntersectionCallback): void;
}