1 | import Swiper from '../swiper-class';
|
2 |
|
3 | export interface ZoomMethods {
|
4 | /**
|
5 | * Whether the zoom module is enabled
|
6 | */
|
7 | enabled: boolean;
|
8 |
|
9 | /**
|
10 | * Current image scale ratio
|
11 | */
|
12 | scale: number;
|
13 |
|
14 | /**
|
15 | * Enable zoom module
|
16 | */
|
17 | enable(): void;
|
18 |
|
19 | /**
|
20 | * Disable zoom module
|
21 | */
|
22 | disable(): void;
|
23 |
|
24 | /**
|
25 | * Zoom in image of the currently active slide
|
26 | */
|
27 | in(): void;
|
28 |
|
29 | /**
|
30 | * Zoom out image of the currently active slide
|
31 | */
|
32 | out(): void;
|
33 |
|
34 | /**
|
35 | * Toggle image zoom of the currently active slide
|
36 | */
|
37 | toggle(): void;
|
38 | }
|
39 |
|
40 | export interface ZoomEvents {
|
41 | /**
|
42 | * Event will be fired on zoom change
|
43 | */
|
44 | zoomChange: (swiper: Swiper, value: number, imageEl: HTMLElement, slideEl: HTMLElement) => void;
|
45 | }
|
46 |
|
47 | export interface ZoomOptions {
|
48 | /**
|
49 | * Maximum image zoom multiplier
|
50 | *
|
51 | * @default 3
|
52 | */
|
53 | maxRatio?: number;
|
54 | /**
|
55 | * Minimal image zoom multiplier
|
56 | *
|
57 | * @default 1
|
58 | */
|
59 | minRatio?: number;
|
60 | /**
|
61 | * Enable/disable zoom-in by slide's double tap
|
62 | *
|
63 | * @default true
|
64 | */
|
65 | toggle?: boolean;
|
66 | /**
|
67 | * CSS class name of zoom container
|
68 | *
|
69 | * @default 'swiper-zoom-container'
|
70 | */
|
71 | containerClass?: string;
|
72 | /**
|
73 | * CSS class name of zoomed in container
|
74 | *
|
75 | * @default 'swiper-slide-zoomed'
|
76 |
|
77 | */
|
78 | zoomedSlideClass?: string;
|
79 | }
|