mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
26 lines
436 B
TypeScript
26 lines
436 B
TypeScript
import * as Croppie from 'croppie';
|
|
|
|
const c = new Croppie(document.getElementById('item'), {
|
|
boundary: { width: 300, height: 300 },
|
|
viewport: { width: 100, height: 100 },
|
|
showZoomer: false,
|
|
enableOrientation: false,
|
|
});
|
|
|
|
c.bind({
|
|
url: 'demo/demo-2.jpg',
|
|
orientation: 4,
|
|
zoom: 0,
|
|
});
|
|
|
|
c.rotate(90);
|
|
|
|
c.setZoom(0.5);
|
|
|
|
c.result({ type: 'blob' }).then(blob => {
|
|
let x: Blob;
|
|
x = blob;
|
|
});
|
|
|
|
c.destroy();
|