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;
|
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
|
* @memberOf wp.media.controller
|
||||||
*
|
* @augments wp.media.controller.CustomizeImageCropper.Cropper
|
||||||
* A state for cropping an image.
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.controller.Cropper
|
|
||||||
* @augments wp.media.controller.State
|
|
||||||
* @augments Backbone.Model
|
|
||||||
*/
|
*/
|
||||||
CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{
|
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 ) {
|
doCrop: function( attachment ) {
|
||||||
var cropDetails = attachment.get( 'cropDetails' ),
|
var cropDetails = attachment.get( 'cropDetails' ),
|
||||||
control = this.get( 'control' ),
|
control = this.get( 'control' ),
|
||||||
|
@ -2,18 +2,28 @@ var Controller = wp.media.controller,
|
|||||||
CustomizeImageCropper;
|
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
|
* @memberOf wp.media.controller
|
||||||
*
|
* @augments wp.media.controller.CustomizeImageCropper.Cropper
|
||||||
* A state for cropping an image.
|
* @inheritDoc
|
||||||
*
|
|
||||||
* @class
|
|
||||||
* @augments wp.media.controller.Cropper
|
|
||||||
* @augments wp.media.controller.State
|
|
||||||
* @augments Backbone.Model
|
|
||||||
*/
|
*/
|
||||||
CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{
|
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 ) {
|
doCrop: function( attachment ) {
|
||||||
var cropDetails = attachment.get( 'cropDetails' ),
|
var cropDetails = attachment.get( 'cropDetails' ),
|
||||||
control = this.get( 'control' ),
|
control = this.get( 'control' ),
|
||||||
|
Loading…
Reference in New Issue
Block a user