WordPress.org

Make WordPress Core

Changeset 42435


Ignore:
Timestamp:
01/11/2018 02:31:14 PM (6 months ago)
Author:
atimmer
Message:

Docs: Improve JS Docs for controllers/customize-image-cropper.js.

Props manuelaugustin, bramheijmink, andizer, ireneyoast.
Fixes #43020.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r42415 r42435  
    24882488
    24892489/**
    2490  * wp.media.controller.CustomizeImageCropper
    2491  *
     2490 * A state for cropping an image in the customizer.
     2491 *
     2492 * @since 4.3.0
     2493 *
     2494 * @constructs wp.media.controller.CustomizeImageCropper
    24922495 * @memberOf wp.media.controller
    2493  *
    2494  * A state for cropping an image.
    2495  *
    2496  * @class
    2497  * @augments wp.media.controller.Cropper
    2498  * @augments wp.media.controller.State
    2499  * @augments Backbone.Model
     2496 * @augments wp.media.controller.CustomizeImageCropper.Cropper
     2497 * @inheritDoc
    25002498 */
    25012499CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller.CustomizeImageCropper.prototype */{
     2500    /**
     2501     * Posts the crop details to the admin.
     2502     *
     2503     * Uses crop measurements when flexible in both directions.
     2504     * Constrains flexible side based on image ratio and size of the fixed side.
     2505     *
     2506     * @since 4.3.0
     2507     *
     2508     * @param {Object} attachment The attachment to crop.
     2509     *
     2510     * @returns {$.promise} A jQuery promise that represents the crop image request.
     2511     */
    25022512    doCrop: function( attachment ) {
    25032513        var cropDetails = attachment.get( 'cropDetails' ),
  • trunk/src/wp-includes/js/media/controllers/customize-image-cropper.js

    r41351 r42435  
    33
    44/**
    5  * wp.media.controller.CustomizeImageCropper
     5 * A state for cropping an image in the customizer.
    66 *
     7 * @since 4.3.0
     8 *
     9 * @constructs wp.media.controller.CustomizeImageCropper
    710 * @memberOf wp.media.controller
    8  *
    9  * A state for cropping an image.
    10  *
    11  * @class
    12  * @augments wp.media.controller.Cropper
    13  * @augments wp.media.controller.State
    14  * @augments Backbone.Model
     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' ),
Note: See TracChangeset for help on using the changeset viewer.