forked from nolimits4web/swiper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzoom.d.ts
91 lines (81 loc) · 1.69 KB
/
zoom.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
import type Swiper from '../swiper-class.d.ts';
export interface ZoomMethods {
/**
* Whether the zoom module is enabled
*/
enabled: boolean;
/**
* Current image scale ratio
*/
scale: number;
/**
* Enable zoom module
*/
enable(): void;
/**
* Disable zoom module
*/
disable(): void;
/**
* Zoom in image of the currently active slide. Optionally accepts custom zoom ratio
*/
in(ratio?: number): void;
/**
* Zoom out image of the currently active slide
*/
out(): void;
/**
* Toggle image zoom of the currently active slide
*/
toggle(event?: MouseEvent | TouchEvent | PointerEvent): void;
}
export interface ZoomEvents {
/**
* Event will be fired on zoom change
*/
zoomChange: (swiper: Swiper, scale: number, imageEl: HTMLElement, slideEl: HTMLElement) => void;
}
export interface ZoomOptions {
/**
* When set to true, the image will not be scaled past 100% of its original size
*
* @default false
*/
limitToOriginalSize?: boolean;
/**
* Maximum image zoom multiplier
*
* @default 3
*/
maxRatio?: number;
/**
* Minimal image zoom multiplier
*
* @default 1
*/
minRatio?: number;
/**
* When set to true, a zoomed in image will automatically pan while moving the mouse over the image
*
* @default false
*/
panOnMouseMove?: boolean;
/**
* Enable/disable zoom-in by slide's double tap
*
* @default true
*/
toggle?: boolean;
/**
* CSS class name of zoom container
*
* @default 'swiper-zoom-container'
*/
containerClass?: string;
/**
* CSS class name of zoomed in container
*
* @default 'swiper-slide-zoomed'
*/
zoomedSlideClass?: string;
}