function setAspectRatio(aspectRatio) {
    var options = this.options;

    if (!this.disabled && !isUndefined(aspectRatio)) {
      // 0 -> NaN
      options.aspectRatio = Math.max(0, aspectRatio) || NaN;

      if (this.ready) {
        this.initCropBox();

        if (this.cropped) {
          this.renderCropBox();
        }
      }
    }

    return this;
  }
function setAspectRatio(aspectRatio) {
    var options = this.options;

    if (!this.disabled && !isUndefined(aspectRatio)) {
      
      options.aspectRatio = Math.max(0, aspectRatio) || NaN;

      if (this.ready) {
        this.initCropBox();

        if (this.cropped) {
          this.renderCropBox();
        }
      }
    }

    return this;
  }
function setAspectRatio ( aspectRatio ) { var options = this . options ; if ( ! this . disabled && ! isUndefined ( aspectRatio ) ) { // 0 -> NaN options . aspectRatio = Math . max ( 0 , aspectRatio ) || NaN ; if ( this . ready ) { this . initCropBox ( ) ; if ( this . cropped ) { this . renderCropBox ( ) ; } } } return this ; }
Change the aspect ratio of the crop box.
@param {number} aspectRatio - The new aspect ratio.
@returns {Cropper} this
Change the aspect ratio of the crop box .