UNPKG

1.31 kBTypeScriptView Raw
1import { CSSSelector } from '../shared';
2
3export interface MousewheelMethods {
4 /**
5 * Whether the mousewheel control is enabled
6 */
7 enabled: boolean;
8
9 /**
10 * Enable mousewheel control
11 */
12 enable(): void;
13
14 /**
15 * Disable mousewheel control
16 */
17 disable(): void;
18}
19
20export interface MousewheelEvents {}
21
22export interface MousewheelOptions {
23 /**
24 * 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.
25
26 *
27 * @default false
28 */
29 forceToAxis?: boolean;
30 /**
31 * 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)
32
33 *
34 * @default false
35 */
36 releaseOnEdges?: boolean;
37 /**
38 * Set to true to invert sliding direction
39 *
40 * @default false
41 */
42 invert?: boolean;
43 /**
44 * Multiplier of mousewheel data, allows to tweak mouse wheel sensitivity
45 *
46 * @default 1
47 */
48 sensitivity?: number;
49 /**
50 * String with CSS selector or HTML element of the container accepting mousewheel events. By default it is swiper-container
51 *
52 * @default 'container'
53 */
54 eventsTarget?: 'container' | 'wrapper' | CSSSelector | HTMLElement;
55}