UNPKG

react-advanced-cropper

Version:

The react cropper library that gives the possibility to create croppers exactly suited for your website design

45 lines (44 loc) 1.46 kB
import { ReactNode, Component, RefObject } from 'react'; import { MoveDirections, Point, SimpleTouch } from 'advanced-cropper'; interface Props { className?: string; children?: ReactNode; disabled?: boolean; onMove?: (directions: MoveDirections, nativeEvent: MouseEvent | TouchEvent) => void; onMoveEnd?: () => void; onMoveStart?: () => void; onLeave?: () => void; onEnter?: () => void; useAnchor?: boolean; activationDistance?: number; } export declare class DraggableElement extends Component<Props> { touches: SimpleTouch[]; started: boolean; hovered: boolean; anchor: Point; container: RefObject<HTMLDivElement>; static defaultProps: { disabled: boolean; activationDistance: number; useAnchor: boolean; rerender: boolean; }; constructor(props: Props); processMove: (e: MouseEvent | TouchEvent, newTouches: SimpleTouch[]) => void; processEnd: () => void; initAnchor: (touch: SimpleTouch) => void; onMouseOver: () => void; onMouseLeave: () => void; onTouchStart: (e: TouchEvent) => void; onTouchEnd: () => void; onTouchMove: (e: TouchEvent) => void; onMouseDown: (e: MouseEvent) => void; onMouseMove: (e: MouseEvent) => void; onMouseUp: () => void; componentWillUnmount(): void; componentDidMount(): void; componentDidUpdate(prevProps: Readonly<Props>): void; render(): JSX.Element; } export {};