mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* cropperjs: make CropBoxData's fields optional * cropperjs: Added 4 new options to getCroppedCanvas method: minWidth, minHeight, maxWidth and maxHeight. see https://github.com/fengyuanchen/cropperjs/releases/tag/v1.1.0 * cropperjs: tslint
16 lines
413 B
TypeScript
16 lines
413 B
TypeScript
import * as Cropper from 'cropperjs';
|
|
|
|
const image = <HTMLImageElement> document.getElementById('image');
|
|
const cropper = new Cropper(image, {
|
|
aspectRatio: 16 / 9,
|
|
crop(e) {
|
|
console.log(e.detail.x);
|
|
console.log(e.detail.y);
|
|
console.log(e.detail.width);
|
|
console.log(e.detail.height);
|
|
console.log(e.detail.rotate);
|
|
console.log(e.detail.scaleX);
|
|
console.log(e.detail.scaleY);
|
|
}
|
|
});
|