UNPKG

@r365/react-calendar-timeline

Version:
41 lines (40 loc) 1.4 kB
import { Component, MouseEventHandler, ReactNode, TouchEventHandler } from 'react'; type Props = { children: ReactNode; width: number; height: number; traditionalZoom: boolean; scrollRef: (e: HTMLDivElement) => void; onZoom: (n: number, m: number) => void; onWheelZoom: (speed: number, xPosition: number, deltaY: number) => void; onScroll: (n: number) => void; }; type State = { isDragging: boolean; }; declare class ScrollElement extends Component<Props, State> { scrollComponent: HTMLDivElement | null; private dragLastPosition; private lastTouchDistance; private singleTouchStart; private lastSingleTouch; private isItemInteraction; constructor(props: Props); /** * needed to handle scrolling with trackpad */ handleScroll: () => void; refHandler: (el: HTMLDivElement) => void; handleWheel: (e: WheelEvent) => void; handleMouseDown: MouseEventHandler<HTMLDivElement>; handleMouseMove: MouseEventHandler<HTMLDivElement>; handleMouseUp: () => void; handleMouseLeave: () => void; handleTouchStart: TouchEventHandler<HTMLDivElement>; handleTouchMove: TouchEventHandler<HTMLDivElement>; handleTouchEnd: () => void; handleItemInteract: (e: Event) => void; componentWillUnmount(): void; render(): import("react/jsx-runtime").JSX.Element; } export default ScrollElement;