Docs: Improve JS Docs for `controllers/customize-image-cropper.js`.
Props manuelaugustin, bramheijmink, andizer, ireneyoast. Fixes #43020. git-svn-id: https://develop.svn.wordpress.org/trunk@42435 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
91b3164ee5
commit
b9b2f2a79d
|
@ -2487,18 +2487,28 @@ var Controller = wp.media.controller,
|
|||
CustomizeImageCropper;
|
||||
|
||||
/**
|
||||
* wp.media.controller.CustomizeImageCropper
|
||||
* A state for cropping an image in the customizer.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @constructs wp.media.controller.CustomizeImageCropper
|
||||
* @memberOf wp.media.controller
|
||||
*
|
||||
* A state for cropping an image.
|
||||
*
|
||||
* @class
|
||||
* @augments wp.media.controller.Cropper
|
||||
* @augments wp.media.controller.State
|
||||
* @augments Backbone.Model
|
||||
* @augments wp.media.controller.CustomizeImageCropper.Cropper
|
||||
* @inheritDoc
|
||||
*/
|
||||
CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{
|
||||
/**
|
||||
* Posts the crop details to the admin.
|
||||
*
|
||||
* Uses crop measurements when flexible in both directions.
|
||||
* Constrains flexible side based on image ratio and size of the fixed side.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @param {Object} attachment The attachment to crop.
|
||||
*
|
||||
* @returns {$.promise} A jQuery promise that represents the crop image request.
|
||||
*/
|
||||
doCrop: function( attachment ) {
|
||||
var cropDetails = attachment.get( 'cropDetails' ),
|
||||
control = this.get( 'control' ),
|
||||
|
|
|
@ -2,18 +2,28 @@ var Controller = wp.media.controller,
|
|||
CustomizeImageCropper;
|
||||
|
||||
/**
|
||||
* wp.media.controller.CustomizeImageCropper
|
||||
* A state for cropping an image in the customizer.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @constructs wp.media.controller.CustomizeImageCropper
|
||||
* @memberOf wp.media.controller
|
||||
*
|
||||
* A state for cropping an image.
|
||||
*
|
||||
* @class
|
||||
* @augments wp.media.controller.Cropper
|
||||
* @augments wp.media.controller.State
|
||||
* @augments Backbone.Model
|
||||
* @augments wp.media.controller.CustomizeImageCropper.Cropper
|
||||
* @inheritDoc
|
||||
*/
|
||||
CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{
|
||||
/**
|
||||
* Posts the crop details to the admin.
|
||||
*
|
||||
* Uses crop measurements when flexible in both directions.
|
||||
* Constrains flexible side based on image ratio and size of the fixed side.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*
|
||||
* @param {Object} attachment The attachment to crop.
|
||||
*
|
||||
* @returns {$.promise} A jQuery promise that represents the crop image request.
|
||||
*/
|
||||
doCrop: function( attachment ) {
|
||||
var cropDetails = attachment.get( 'cropDetails' ),
|
||||
control = this.get( 'control' ),
|
||||
|
|
Loading…
Reference in New Issue