forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iscroll-5-lite.d.ts
39 lines (32 loc) · 1.01 KB
/
iscroll-5-lite.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
// Type definitions for iScroll Lite 5
// Project: http://cubiq.org/iscroll-5-ready-for-beta-test
// Definitions by: Christiaan Rakowski <https://github.com/csrakowski/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface IScrollOptions {
//hScroll?: boolean;
//vScroll?: boolean;
scrollX?: boolean;
scrollY?: boolean;
x?: number;
y?: number;
bounce?: boolean;
bounceLock?: boolean;
momentum?: boolean;
lockDirection?: boolean;
useTransform?: boolean;
useTransition?: boolean;
}
declare class IScroll {
constructor (element: string, options?: IScrollOptions);
constructor (element: HTMLElement, options?: IScrollOptions);
destroy(): void;
refresh(): void;
scrollTo(x: number, y: number, time?: number, relative?: boolean): void;
scrollToElement(element: string, time?: number): void;
scrollToElement(element: HTMLElement, time?: number): void;
disable(): void;
enable(): void;
stop(): void;
// Events
on: (type: string, fn: () => void) => void;
}