q-view
Version:
[Preview](https://q-hub-q-view.vercel.app/)
70 lines (69 loc) • 1.74 kB
TypeScript
import { QuarkElement, Ref } from 'quarkc';
import Dialog from '../dialog';
interface RECT {
imgWidth: number;
imgHeight: number;
cropperWidth: number;
cropperHeight: number;
}
export default class ImageResize extends QuarkElement {
src: string;
width: number;
height: number;
matrix: string;
rect: string;
readOnly: boolean;
isControl: boolean;
elRef: Ref<HTMLElement>;
dialogRef: Ref<Dialog>;
imgRef: Ref<HTMLImageElement>;
contentRef: Ref<HTMLElement>;
isMoving: boolean;
startX: any;
startY: any;
startEl: any;
curRect: {
width: any;
height: any;
};
get computedRect(): RECT;
get parentStyle(): {
width: number;
height: number;
};
get contentStyle(): {
width: string | number;
height: string | number;
overflow: string;
};
get imgStyle(): {
width: string | number;
height: string | number;
transform: string;
userSelect: string;
display: string;
transformOrigin: string;
};
get data(): {
src: string;
width: number;
height: number;
rect: string;
matrix: string;
readOnly: boolean;
};
componentDidMount(): void;
shouldComponentUpdate(propName: string, oldValue: any, newValue: any): boolean;
listen: (e: any) => void;
handleMouseMove: (e: any) => void;
handleMouseUp: () => void;
setCursor: (v: string) => void;
handleClick: () => void;
toggleControl: () => void;
handleClickByOut: (e: any) => void;
stopToolbar: (e: any) => void;
getClassName: () => string;
emitLoad: () => void;
render(): any;
}
export {};