Foliotek / Croppie

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

rebind the viewport and boundary on button click #795

Open ColdstarJoey opened 7 months ago

ColdstarJoey commented 7 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'); }