react-moveable
Version:
A React Component that create Moveable, Draggable, Resizable, Scalable, Rotatable, Warpable, Pinchable, Groupable.
40 lines (39 loc) • 1.76 kB
TypeScript
import MoveableManager from "../MoveableManager";
import { ScalableProps, ResizableProps, OnScaleGroup, Renderer, OnScaleGroupStart, DraggableProps, OnDragStart, OnDrag, SnappableState, GroupableProps } from "../types";
import { directionCondition } from "../groupUtils";
import MoveableGroup from "../MoveableGroup";
declare const _default: {
name: string;
dragControlOnly: boolean;
canPinch: boolean;
render(moveable: MoveableManager<Partial<ResizableProps & ScalableProps>, {}>, React: Renderer): any[] | undefined;
dragControlCondition: typeof directionCondition;
dragControlStart(moveable: MoveableManager<ScalableProps & DraggableProps, SnappableState>, e: any): false | {
target: SVGElement | HTMLElement;
clientX: any;
clientY: any;
datas: any;
direction: number[];
set: (scale: number[]) => void;
dragStart: OnDragStart;
};
dragControl(moveable: MoveableManager<ScalableProps & DraggableProps & GroupableProps, SnappableState>, e: any): false | {
target: SVGElement | HTMLElement;
scale: number[];
direction: any;
dist: number[];
delta: number[];
transform: string;
clientX: any;
clientY: any;
datas: any;
isPinch: boolean;
drag: OnDrag;
};
dragControlEnd(moveable: MoveableManager<ScalableProps, {}>, { datas, isDrag, clientX, clientY }: any): any;
dragGroupControlCondition: typeof directionCondition;
dragGroupControlStart(moveable: MoveableGroup, e: any): false | OnScaleGroupStart;
dragGroupControl(moveable: MoveableGroup, e: any): OnScaleGroup | undefined;
dragGroupControlEnd(moveable: MoveableGroup, e: any): any;
};
export default _default;