UNPKG

react-moveable

Version:

A React Component that create Moveable, Draggable, Resizable, Scalable, Rotatable, Warpable, Pinchable, Groupable.

16 lines (15 loc) 658 B
import * as React from "react"; import { MoveableProps, MoveableInterface, RectInfo } from "./types"; import MoveableManager from "./MoveableManager"; import MoveableGroup from "./MoveableGroup"; export default class Moveable<T = {}> extends React.PureComponent<MoveableProps & T> implements MoveableInterface { moveable: MoveableManager<MoveableProps> | MoveableGroup; render(): JSX.Element; isMoveableElement(target: HTMLElement): boolean; dragStart(e: MouseEvent | TouchEvent): void; isInside(clientX: number, clientY: number): boolean; updateRect(): void; updateTarget(): void; getRect(): RectInfo; destroy(): void; }