From 6a81ffff31a55e4eff0ddc1330c56230f24ffd0d Mon Sep 17 00:00:00 2001 From: Anton Timmermans Date: Tue, 13 Feb 2018 15:44:14 +0000 Subject: [PATCH] Docs: Improve JSDoc for `media/views/spinner.js`. Amends r42675 - includes the built media files. git-svn-id: https://develop.svn.wordpress.org/trunk@42709 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/js/media-views.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/wp-includes/js/media-views.js b/src/wp-includes/js/media-views.js index 3287b73762..5b10a05d5f 100644 --- a/src/wp-includes/js/media-views.js +++ b/src/wp-includes/js/media-views.js @@ -9369,6 +9369,10 @@ module.exports = EditImage; /** * wp.media.view.Spinner * + * Represents a spinner in the Media Library. + * + * @since 3.9.0 + * * @memberOf wp.media.view * * @class @@ -9382,6 +9386,13 @@ var Spinner = wp.media.View.extend(/** @lends wp.media.view.Spinner.prototype */ spinnerTimeout: false, delay: 400, + /** + * Shows the spinner. Delays the visibility by the configured amount. + * + * @since 3.9.0 + * + * @return {wp.media.view.Spinner} The spinner. + */ show: function() { if ( ! this.spinnerTimeout ) { this.spinnerTimeout = _.delay(function( $el ) { @@ -9392,6 +9403,13 @@ var Spinner = wp.media.View.extend(/** @lends wp.media.view.Spinner.prototype */ return this; }, + /** + * Hides the spinner. + * + * @since 3.9.0 + * + * @return {wp.media.view.Spinner} The spinner. + */ hide: function() { this.$el.removeClass( 'is-active' ); this.spinnerTimeout = clearTimeout( this.spinnerTimeout );