e-virt-table
Version:
A powerful data table based on canvas. You can use it as data grid、Microsoft Excel or Google sheets. It supports virtual scroll、cell edit etc.
21 lines (20 loc) • 679 B
TypeScript
import Context from './Context';
export type ScrollbarType = 'horizontal' | 'vertical';
export default class Scroller {
private ctx;
private verticalScrollbar;
private horizontalScrollbar;
constructor(ctx: Context);
onWheel(e: WheelEvent): void;
onMouseDown(e: MouseEvent): void;
onMouseMove(e: MouseEvent): void;
onMouseUp(): void;
draw(): void;
setScroll(x: number, y: number): void;
setScrollX(scrollX: number): void;
setScrollY(scrollY: number): void;
scrollToColkey(key: string): void;
scrollToColIndex(colIndex: number): void;
scrollToRowIndex(rowIndex: number): void;
scrollToRowKey(rowKey: string): void;
}