Foliotek / Croppie

A Javascript Image Cropper
http://foliotek.github.io/Croppie
MIT License
2.58k stars 883 forks source link

rebind the viewport and boundary on button click #795

Open ColdstarJoey opened 11 months ago

ColdstarJoey commented 11 months ago

Hi there,

is there a way to rebind the viewport and boundary size and shape via a button click?

I have tried the following but no luck:

reader.onload = function (e) { croppie.bind({ url: e.target.result, viewport: { width: 350, height: 180, type: 'rectangle' }, }); $('#cropModal').modal('show'); }