-
Notifications
You must be signed in to change notification settings - Fork 62
/
index.d.ts
64 lines (61 loc) · 1.89 KB
/
index.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
declare module "smartphoto" {
type SmartPhotoEvent = 'open'|'close'|'change'|'swipestart'|'swipeend'|'zoomin'|'zoomout'|'gesturestart'|'gestureend';
interface SmartPhotoOption {
classNames?: {
smartPhoto: string,
smartPhotoClose: string,
smartPhotoBody: string,
smartPhotoInner: string,
smartPhotoContent: string,
smartPhotoImg: string,
smartPhotoImgOnMove: string,
smartPhotoImgElasticMove: string,
smartPhotoImgWrap: string,
smartPhotoArrows: string,
smartPhotoNav: string,
smartPhotoArrowRight: string,
smartPhotoArrowLeft: string,
smartPhotoImgLeft: string,
smartPhotoImgRight: string,
smartPhotoList: string,
smartPhotoListOnMove: string,
smartPhotoHeader: string,
smartPhotoCount: string,
smartPhotoCaption: string,
smartPhotoDismiss: string,
smartPhotoLoader: string,
smartPhotoLoaderWrap: string,
smartPhotoImgClone: string
},
message?: {
gotoNextImage: string,
gotoPrevImage: string,
closeDialog: string
},
arrows?: boolean,
nav?: boolean,
showAnimation?: boolean,
verticalGravity?: boolean,
useOrientationApi?: boolean,
useHistoryApi?: boolean,
swipeTopToClose?: boolean,
swipeBottomToClose?: boolean,
swipeOffset?: number,
headerHeight?: number,
footerHeight?: number,
forceInterval?: number,
registance?: number,
loadOffset?: number,
resizeStyle?: 'fit'|'cover',
}
export default class SmartPhoto {
constructor(selector: string | NodeListOf<HTMLElement>, option?:SmartPhotoOption);
on(event: SmartPhotoEvent, eventListener: EventListenerOrEventListenerObject) :void;
destroy(): void;
addNewItem(element: HTMLElement): void;
hidePhoto(dir: 'bottom'|'top'): void;
gotoSlide(index: number): void;
zoomPhoto(): void;
zoomOutPhoto(): void;
}
}