UNPKG

@exadel/esl

Version:

Exadel Smart Library (ESL) is the lightweight custom elements library that provide a set of super-flexible components

43 lines (42 loc) 1.44 kB
import { ESLWheelEvent } from '../../../esl-event-listener/core'; import { ESLCarouselPlugin } from '../esl-carousel.plugin'; export interface ESLCarouselWheelConfig { /** Prefix to request next/prev navigation */ command: 'slide' | 'group'; /** CSS selector to ignore wheel event from */ ignore: string; /** * Restricts wheel direction. * Values: * - 'auto' - depends on the carousel orientation (default) * - 'x' - horizontal only * - 'y' - vertical only */ direction: string; /** Prevent default action for wheel event */ preventDefault: boolean; } /** * {@link ESLCarousel} wheel control plugin mixin * Switch slides by mouse wheel * * @author Alexey Stsefanovich (ala'n) */ export declare class ESLCarouselWheelMixin extends ESLCarouselPlugin<ESLCarouselWheelConfig> { static is: string; static DEFAULT_CONFIG_KEY: string; static readonly DEFAULT_CONFIG: ESLCarouselWheelConfig; /** @returns true if the plugin should track vertical wheel */ protected get isVertical(): boolean; /** @returns true if the plugin should track passed event */ protected isEventIgnored(e: WheelEvent & { target: Element; }): boolean; /** Handles auxiliary events to pause/resume timer */ protected _onWheel(e: ESLWheelEvent): void; } declare global { export interface ESLCarouselNS { Wheel: typeof ESLCarouselWheelMixin; } }