forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swipeview.d.ts
43 lines (34 loc) · 1.02 KB
/
swipeview.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Type definitions for SwipeView 1.0
// Project: http://cubiq.org/swipeview
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/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;
}