forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zynga-scroller.d.ts
50 lines (49 loc) · 1.74 KB
/
zynga-scroller.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
44
45
46
47
48
49
50
// Type definitions for Zynga Scroller
// Project: http://zynga.github.com/scroller/
// Definitions by: Marcelo Haskell Camargo <https://github.com/haskellcamargo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare class Scroller {
constructor(a: (left: number, top: number, zoom: number) => void, b?: {
scrollingX?: boolean;
scrollingY?: boolean;
animating?: boolean;
animationDuration?: number;
bouncing?: boolean;
locking?: boolean;
paging?: boolean;
snapping?: boolean;
zooming?: number;
minZoom?: number;
maxZoom?: number
});
setDimensions(clientWidth: number, clientHeight: number, contentWidth: number,
contentHeight: number): void;
setPosition(clientLeft: number, clientTop: number): void;
setSnapSize(width: number, height: number): void;
activatePullToRefresh<T>(height: number, activate: () => void,
deactivate: () => void, start: () => void): void;
finishPullToRefresh(): void;
getValues(): {
left: number;
top: number;
zoom: number
};
zoomTo(level: number, animate?: boolean, originLeft?: number,
originTop?: number): void;
zoomBy(factor: number, animate?: boolean, originLeft?: number,
originTop?: number): void;
scrollTo(left: number, top: number, animate?: boolean): void;
scrollBy(leftOffset: number, topOffset: number, animate?: boolean): void;
doMouseZoom(wheelData: number, timeStamp: number, pageX: number,
pageY: number): void;
doTouchStart(touches: {
pageX: number;
pageY: number
}, timeStamp: number): void;
doTouchMove(touches: {
pageX: number;
pageY: number
}, timeStamp: number, scale?: number): void;
doTouchMove(touches: [any], timeStamp: number): void;
doTouchEnd(timeStamp: number): void;
}