DragHandler.d.ts 1.4 KB

123456789101112131415161718192021
  1. import { EmblaCarouselType } from './EmblaCarousel';
  2. import { AnimationsType } from './Animations';
  3. import { CounterType } from './Counter';
  4. import { DragTrackerType, PointerEventType } from './DragTracker';
  5. import { EventHandlerType } from './EventHandler';
  6. import { AxisType } from './Axis';
  7. import { ScrollBodyType } from './ScrollBody';
  8. import { ScrollTargetType } from './ScrollTarget';
  9. import { ScrollToType } from './ScrollTo';
  10. import { Vector1DType } from './Vector1d';
  11. import { PercentOfViewType } from './PercentOfView';
  12. import { WindowType } from './utils';
  13. type DragHandlerCallbackType = (emblaApi: EmblaCarouselType, evt: PointerEventType) => boolean | void;
  14. export type DragHandlerOptionType = boolean | DragHandlerCallbackType;
  15. export type DragHandlerType = {
  16. init: (emblaApi: EmblaCarouselType) => void;
  17. destroy: () => void;
  18. pointerDown: () => boolean;
  19. };
  20. export declare function DragHandler(axis: AxisType, rootNode: HTMLElement, ownerDocument: Document, ownerWindow: WindowType, target: Vector1DType, dragTracker: DragTrackerType, location: Vector1DType, animation: AnimationsType, scrollTo: ScrollToType, scrollBody: ScrollBodyType, scrollTarget: ScrollTargetType, index: CounterType, eventHandler: EventHandlerType, percentOfView: PercentOfViewType, dragFree: boolean, dragThreshold: number, skipSnaps: boolean, baseFriction: number, watchDrag: DragHandlerOptionType): DragHandlerType;
  21. export {};