react-calendar-timeline
Version:
react-calendar-timeline
44 lines (43 loc) • 1.5 kB
TypeScript
import { Component, ReactNode } 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> {
scrollComponentRef: import("react").RefObject<HTMLDivElement>;
private dragLastPosition;
private lastTouchDistance;
private singleTouchStart;
private lastSingleTouch;
private isItemInteraction;
constructor(props: Props);
componentDidMount(): void;
handlePointerStart: (e: PointerEvent) => void;
handlePointerMove: (e: PointerEvent) => void;
handlePointerEnd: (e: PointerEvent) => void;
/**
* needed to handle scrolling with trackpad
*/
handleScroll: () => void;
handleWheel: (e: WheelEvent) => void;
handleMouseDown: (e: PointerEvent) => void;
handleMouseMove: (e: PointerEvent) => void;
handleMouseUp: () => void;
handlePointerLeave: (e: PointerEvent) => void;
handleTouchStart: (e: PointerEvent) => void;
handleTouchMove: (e: PointerEvent) => void;
handleTouchEnd: () => void;
handleItemInteract: (e: Event) => void;
componentWillUnmount(): void;
render(): import("react/jsx-runtime").JSX.Element;
}
export default ScrollElement;