Files
DefinitelyTyped/types/croppie/croppie-tests.ts
2018-05-12 22:31:04 +02:00

28 lines
446 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.get();
c.destroy();