mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
43 lines
1004 B
TypeScript
43 lines
1004 B
TypeScript
// Type definitions for SwipeView 1.0
|
|
// Project: http://cubiq.org/swipeview
|
|
// Definitions by: Boris Yankov <https://github.com/borisyankov>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
|
|
interface SwipeViewEvent {
|
|
(fn: Function): void;
|
|
}
|
|
|
|
interface SwipeViewOptions {
|
|
text?: string;
|
|
numberOfPages?: number;
|
|
snapThreshold?: number;
|
|
hastyPageFlip?: boolean;
|
|
loop?: boolean;
|
|
}
|
|
|
|
declare class SwipeView {
|
|
|
|
masterPages: HTMLElement[];
|
|
currentMasterPage: number;
|
|
wrapper: HTMLElement;
|
|
slider: HTMLElement;
|
|
|
|
constructor (element: string);
|
|
constructor (element: string, options: SwipeViewOptions);
|
|
|
|
destroy(): void;
|
|
refreshSize(): void;
|
|
updatePageCount(n: number): void;
|
|
goToPage(p: number): void;
|
|
next(): void;
|
|
prev(): void;
|
|
handleEvent(e: Event): void;
|
|
|
|
onFlip: SwipeViewEvent;
|
|
onMoveOut: SwipeViewEvent;
|
|
onMoveIn: SwipeViewEvent;
|
|
onTouchStart: SwipeViewEvent;
|
|
|
|
wrapperHeight: number;
|
|
} |