From 6310ad30d0658f5b37329917edd0676d6c1d919f Mon Sep 17 00:00:00 2001 From: atimmer Date: Thu, 11 Jan 2018 14:32:52 +0000 Subject: [PATCH] Docs: Improve JS Docs for `controllers/customize-image-cropper.js`. Props manuelaugustin, bramheijmink, andizer, ireneyoast. Fixes #43020. Built from https://develop.svn.wordpress.org/trunk@42435 git-svn-id: http://core.svn.wordpress.org/trunk@42265 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/media-views.js | 26 ++++++++++++++++++-------- wp-includes/version.php | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index c9c3a8af3e..60ad65ee48 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -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' ), diff --git a/wp-includes/version.php b/wp-includes/version.php index f4b8fd2fb0..d4369bbdf9 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42433'; +$wp_version = '5.0-alpha-42435'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.