forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fancybox.d.ts
129 lines (113 loc) · 2.92 KB
/
fancybox.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
// Type definitions for fancyBox 2.1
// Project: https://github.com/fancyapps/fancyBox
// Definitions by: Boris Yankov <https://github.com/borisyankov/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../jquery/jquery.d.ts" />
interface FancyboxOptions extends FancyboxCallback {
padding?: any; // number or []
margin?: any; // number or []
width?: any; // number or []
height?: any; // number or []
minWidth?: number;
minHeight?: number;
maxWidth?: number;
maxHeight?: number;
autoSize?: boolean;
autoHeight?: boolean;
autoWidth?: boolean;
autoResize?: boolean;
autoCenter?: boolean;
fitToView?: boolean;
aspectRatio?: boolean;
topRatio?: number;
leftRatio?: number;
scrolling?: string;
wrapCSS?: string;
arrows?: boolean;
closeBtn?: boolean;
closeClick?: boolean;
nextClick?: boolean;
mouseWheel?: boolean;
autoPlay?: boolean;
playSpeed?: number;
preload?: number;
modal?: boolean;
loop?: boolean;
ajax?: any;
iframe?: any;
swf?: any;
keys?: any;
direction?: any;
scrollOutside?: boolean;
index?: number;
type?: string;
href?: string;
content?: string;
title?: string;
tpl?: any;
openEffect?: string;
closeEffect?: string;
nextEffect?: string;
prevEffect?: string;
openSpeed?: number;
closeSpeed?: number;
nextSpeed?: number;
prevSpeed?: number;
openEasing?: string;
closeEasing?: string;
nextEasing?: string;
prevEasing?: string;
openOpacity?: boolean;
closeOpacity?: boolean;
openMethod?: string;
closeMethod?: string;
nextMethod?: string;
prevMethod?: string;
helpers?: any;
}
interface FancyboxMethods {
open(group?: any[], options?: FancyboxOptions);
cancel();
close(force?: boolean);
play();
next();
prev();
jumpto(index?: number);
reposition();
update();
toggle();
showLoading();
hideLoading();
(options: FancyboxOptions): void;
(selector: string, options?: FancyboxOptions): void;
(selector: JQuery, options?: FancyboxOptions): void;
(group?: any[], options?: FancyboxOptions): void;
}
interface FancyboxCallback {
onCancel?: Function;
beforeLoad?: Function;
afterLoad?: Function;
beforeShow?: Function;
afterShow?: Function;
beforeClose?: Function;
afterClose?: Function;
onUpdate?: Function;
onPlayStart?: Function;
onPlayEnd?: Function;
}
interface FancyboxThumbnailHelperOptions {
width?: number;
height?: number;
source?: any;
position?: string;
}
interface FancyboxButtonHelperOptions {
tpl?: string;
position?: string;
}
interface JQuery {
fancybox: FancyboxMethods;
}
interface JQueryStatic {
fancybox: FancyboxMethods;
}