Make WordPress Core

Changeset 42353 for trunk


Ignore:
Timestamp:
12/03/2017 06:55:31 PM (9 years ago)
Author:
adamsilverstein
Message:

Docs: Improve JSDocs for cropper.js.

Ammends r42352 - include the built media files.

File:
1 edited

Legend:

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

    r41937 r42353  
    22982298 * wp.media.controller.Cropper
    22992299 *
    2300  * A state for cropping an image.
     2300 * A class for cropping an image when called from the header media customization panel.
    23012301 *
    23022302 * @memberOf wp.media.controller
     
    23202320        },
    23212321
     2322        /**
     2323         * @summary Opens the crop image window.
     2324         *
     2325         * Shows the crop image window when called from the Add new image button.
     2326         *
     2327         * @since 4.2.0
     2328         *
     2329         * @returns {void}
     2330         */
    23222331        activate: function() {
    23232332                this.frame.on( 'content:create:crop', this.createCropContent, this );
     
    23262335        },
    23272336
     2337        /**
     2338         * @summary Changes the state of the toolbar window to browse mode.
     2339         *
     2340         * @since 4.2.0
     2341         *
     2342         * @returns {void}
     2343         */
    23282344        deactivate: function() {
    23292345                this.frame.toolbar.mode('browse');
    23302346        },
    23312347
     2348        /**
     2349         * @summary Creates the crop image window.
     2350         *
     2351         * Initialized when clicking on the Select and Crop button.
     2352         *
     2353         * @since 4.2.0
     2354         *
     2355         * @fires crop window
     2356         *
     2357         * @returns {void}
     2358         */
    23322359        createCropContent: function() {
    23332360                this.cropperView = new wp.media.view.Cropper({
     
    23392366
    23402367        },
     2368
     2369        /**
     2370         * @summary Removes the image selection and closes the cropping window.
     2371         *
     2372         * @since 4.2.0
     2373         *
     2374         * @returns {void}
     2375         */
    23412376        removeCropper: function() {
    23422377                this.imgSelect.cancelSelection();
     
    23452380                this.cropperView.remove();
    23462381        },
     2382
     2383        /**
     2384         * @summary Checks if cropping can be skipped and creates crop toolbar accordingly.
     2385         *
     2386         * @since 4.2.0
     2387         *
     2388         * @returns {void}
     2389         */
    23472390        createCropToolbar: function() {
    23482391                var canSkipCrop, toolbarOptions;
     
    24002443        },
    24012444
     2445        /**
     2446         * @summary Creates an object with the image attachment and crop properties.
     2447         *
     2448         * @since 4.2.0
     2449         *
     2450         * @returns {$.promise} A jQuery promise with the custom header crop details.
     2451         */
    24022452        doCrop: function( attachment ) {
    24032453                return wp.ajax.post( 'custom-header-crop', _.extend(
Note: See TracChangeset for help on using the changeset viewer.