dist/js/cropjs.js
function (crop) {
            if (crop instanceof IMSoftcrop.Softcrop !== true) {
                return;
            }

            var div = document.getElementById(this._image.id + '_' + crop.id);
            var divs = this._previewContainer.getElementsByClassName('imc_preview_image_container');
            for (var n = 0; n < divs.length; n++) {
                divs[n].classList.remove('active');
            }

            div.classList.add('active');

            this._crop = crop;
            this._image.setActiveCrop(crop);
            this._cropLockedToggle.on = crop.locked;
            this._cropUsableToggle.on = crop.usable;
            this.redraw();
            this.updateImageInfo(true);
        }
function (crop) {
            if (crop instanceof IMSoftcrop.Softcrop !== true) {
                return;
            }

            var div = document.getElementById(this._image.id + '_' + crop.id);
            var divs = this._previewContainer.getElementsByClassName('imc_preview_image_container');
            for (var n = 0; n < divs.length; n++) {
                divs[n].classList.remove('active');
            }

            div.classList.add('active');

            this._crop = crop;
            this._image.setActiveCrop(crop);
            this._cropLockedToggle.on = crop.locked;
            this._cropUsableToggle.on = crop.usable;
            this.redraw();
            this.updateImageInfo(true);
        }
function ( crop ) { if ( crop instanceof IMSoftcrop . Softcrop !== true ) { return ; } var div = document . getElementById ( this . _image . id + '_' + crop . id ) ; var divs = this . _previewContainer . getElementsByClassName ( 'imc_preview_image_container' ) ; for ( var n = 0 ; n < divs . length ; n ++ ) { divs [ n ] . classList . remove ( 'active' ) ; } div . classList . add ( 'active' ) ; this . _crop = crop ; this . _image . setActiveCrop ( crop ) ; this . _cropLockedToggle . on = crop . locked ; this . _cropUsableToggle . on = crop . usable ; this . redraw ( ) ; this . updateImageInfo ( true ) ; }
Set active crop
@param crop
Set active crop