1 | import Swiper from '../swiper-class';
|
2 | import { CSSSelector } from '../shared';
|
3 |
|
4 | export interface MousewheelMethods {
|
5 | /**
|
6 | * Whether the mousewheel control is enabled
|
7 | */
|
8 | enabled: boolean;
|
9 |
|
10 | /**
|
11 | * Enable mousewheel control
|
12 | */
|
13 | enable(): void;
|
14 |
|
15 | /**
|
16 | * Disable mousewheel control
|
17 | */
|
18 | disable(): void;
|
19 | }
|
20 |
|
21 | export interface MousewheelEvents {
|
22 | /**
|
23 | * Event will be fired on mousewheel scroll
|
24 | */
|
25 | scroll: (swiper: Swiper, event: WheelEvent) => void;
|
26 | }
|
27 |
|
28 | export interface MousewheelOptions {
|
29 | /**
|
30 | * Set to `true` to force mousewheel swipes to axis. So in horizontal mode mousewheel will work only with horizontal mousewheel scrolling, and only with vertical scrolling in vertical mode.
|
31 |
|
32 | *
|
33 | * @default false
|
34 | */
|
35 | forceToAxis?: boolean;
|
36 | /**
|
37 | * Set to `true` and swiper will release mousewheel event and allow page scrolling when swiper is on edge positions (in the beginning or in the end)
|
38 |
|
39 | *
|
40 | * @default false
|
41 | */
|
42 | releaseOnEdges?: boolean;
|
43 | /**
|
44 | * Set to `true` to invert sliding direction
|
45 | *
|
46 | * @default false
|
47 | */
|
48 | invert?: boolean;
|
49 | /**
|
50 | * Multiplier of mousewheel data, allows to tweak mouse wheel sensitivity
|
51 | *
|
52 | * @default 1
|
53 | */
|
54 | sensitivity?: number;
|
55 | /**
|
56 | * String with CSS selector or HTML element of the container accepting mousewheel events. By default it is swiper
|
57 | *
|
58 | * @default 'container'
|
59 | */
|
60 | eventsTarget?: 'container' | 'wrapper' | CSSSelector | HTMLElement;
|
61 |
|
62 | /**
|
63 | * Minimum mousewheel scroll delta to trigger swiper slide change
|
64 | *
|
65 | * @default null
|
66 | */
|
67 | thresholdDelta?: number | null;
|
68 |
|
69 | /**
|
70 | * Minimum mousewheel scroll time delta (in ms) to trigger swiper slide change
|
71 | *
|
72 | * @default null
|
73 | */
|
74 | thresholdTime?: number | null;
|
75 | }
|