Foliotek / Croppie

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

replace minSize with minWidth and minHeight and update Croppie.defaults #687

Closed nzadravec closed 10 months ago

nzadravec commented 4 years ago

Replaced minSize with minWidth and minHeight and updated Croppie.defaults so users can easily restrict minimal boundary (instead of using event hander).

Example:

var el = document.getElementById('vanilla-demo');

var vanilla = new Croppie(el, {
        viewport: { width: 300, height: 374 },
        boundary: { width: 450, height: 450 },
        showZoomer: true,
        enableResize: true,
        resizeControls: {
            minWidth: 250, // this sets min width
            minHeight: 250 // this sets min height
        },
        enableOrientation: true,
        mouseWheelZoom: 'ctrl'
});