UNPKG

vue-easy-lightbox

Version:

A Vue.js 3.0 image lightbox component with Zoom / Drag / Rotate / Switch

22 lines (21 loc) 898 B
import { IImgState, IImgWrapperState, IStatus } from '../types'; export declare function getDistance(p1: Touch, p2: Touch): number; export declare const useImage: () => { imgRef: import("vue").Ref<HTMLImageElement | undefined>; imgState: { width: number; height: number; maxScale: number; }; setImgSize: () => void; }; export declare const useMouse: (wrapperState: IImgWrapperState, status: IStatus, canMove: (button?: number) => boolean) => { onMouseDown: (e: MouseEvent) => void; onMouseUp: (e: MouseEvent) => void; onMouseMove: (e: MouseEvent) => void; }; export declare const useTouch: (imgState: IImgState, wrapperState: IImgWrapperState, status: IStatus, canMove: (button?: number) => boolean, canPinch: () => boolean) => { onTouchStart: (e: TouchEvent) => void; onTouchMove: (e: TouchEvent) => void; onTouchEnd: () => void; };