WordPress.org

Make WordPress Core

Ticket #43020: customize-image-cropper-2.diff

File customize-image-cropper-2.diff, 1.5 KB (added by ireneyoast, 4 years ago)
  • src/wp-includes/js/media/controllers/customize-image-cropper.js

    diff --git src/wp-includes/js/media/controllers/customize-image-cropper.js src/wp-includes/js/media/controllers/customize-image-cropper.js
    index 5f076178ec..a9c2e9fc90 100644
    var Controller = wp.media.controller, 
    22        CustomizeImageCropper;
    33
    44/**
    5  * wp.media.controller.CustomizeImageCropper
     5 * A state for cropping an image in the customizer.
    66 *
    7  * @memberOf wp.media.controller
    8  *
    9  * A state for cropping an image.
     7 * @since 4.3.0
    108 *
    11  * @class
    12  * @augments wp.media.controller.Cropper
    13  * @augments wp.media.controller.State
    14  * @augments Backbone.Model
     9 * @constructs wp.media.controller.CustomizeImageCropper
     10 * @memberOf wp.media.controller
     11 * @augments wp.media.controller.CustomizeImageCropper.Cropper
     12 * @inheritDoc
    1513 */
    1614CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{
     15        /**
     16         * Posts the crop details to the admin.
     17         *
     18         * Uses crop measurements when flexible in both directions.
     19         * Constrains flexible side based on image ratio and size of the fixed side.
     20         *
     21         * @since 4.3.0
     22         *
     23         * @param {Object} attachment The attachment to crop.
     24         *
     25         * @returns {$.promise} A jQuery promise that represents the crop image request.
     26         */
    1727        doCrop: function( attachment ) {
    1828                var cropDetails = attachment.get( 'cropDetails' ),
    1929                        control = this.get( 'control' ),