JavaScript
9
Вклад в тег
const crop = $('.crop-image').croppie({
viewport: { width: 100, height: 100, type: 'circle' },
boundary: { width: '100%', height: 300 },
update(){
drawCroppedImage();
}
});
function drawCroppedImage(){
crop.croppie('result', {
type: 'rawcanvas',
size: {
width: 100,
height: 100
}
}).then(html => {
$('#cropped-image').html(html);
});
}