react-calendar-timeline
Version:
react-calendar-timeline
41 lines (40 loc) • 1.36 kB
TypeScript
import { Component, MouseEventHandler, 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;
/**
* needed to handle scrolling with trackpad
*/
handleScroll: () => void;
handleWheel: (e: WheelEvent) => void;
handleMouseDown: MouseEventHandler<HTMLDivElement>;
handleMouseMove: MouseEventHandler<HTMLDivElement>;
handleMouseUp: () => void;
handleMouseLeave: () => void;
handleTouchStart: (e: TouchEvent) => void;
handleTouchMove: (e: TouchEvent) => void;
handleTouchEnd: () => void;
handleItemInteract: (e: Event) => void;
componentWillUnmount(): void;
render(): import("react/jsx-runtime").JSX.Element;
}
export default ScrollElement;