wp/wp-admin/js/color-picker.js
changeset 9 177826044cd9
parent 7 cf61fcea0001
child 16 a86126ab1dd4
--- a/wp/wp-admin/js/color-picker.js	Mon Oct 14 18:06:33 2019 +0200
+++ b/wp/wp-admin/js/color-picker.js	Mon Oct 14 18:28:13 2019 +0200
@@ -1,3 +1,7 @@
+/**
+ * @output wp-admin/js/color-picker.js
+ */
+
 /* global wpColorPickerL10n */
 ( function( $, undef ) {
 
@@ -10,13 +14,13 @@
 		_wrappingLabelText = '<span class="screen-reader-text"></span>';
 
 	/**
-	 * @summary Creates a jQuery UI color picker.
+	 * Creates a jQuery UI color picker that is used in the theme customizer.
 	 *
-	 * Creates a jQuery UI color picker that is used in the theme customizer.
+	 * @class $.widget.wp.wpColorPicker
 	 *
 	 * @since 3.5.0
 	 */
-	ColorPicker = {
+	ColorPicker = /** @lends $.widget.wp.wpColorPicker.prototype */{
 		options: {
 			defaultColor: false,
 			change: false,
@@ -29,7 +33,7 @@
 			slider: 'horizontal'
 		},
 		/**
-		 * @summary Creates a color picker that only allows you to adjust the hue.
+		 * Creates a color picker that only allows you to adjust the hue.
 		 *
 		 * @since 3.5.0
 		 *
@@ -54,7 +58,9 @@
 				hide: false,
 				color: color,
 				/**
-				 * @summary Handles the onChange event if one has been defined in the options.
+				 * Handles the onChange event if one has been defined in the options.
+				 *
+				 * @ignore
 				 *
 				 * @param {Event} event    The event that's being called.
 				 * @param {HTMLElement} ui The HTMLElement containing the color picker.
@@ -71,8 +77,6 @@
 			} );
 		},
 		/**
-		 * @summary Creates the color picker.
-		 *
 		 * Creates the color picker, sets default values, css classes and wraps it all in HTML.
 		 *
 		 * @since 3.5.0
@@ -172,13 +176,13 @@
 				mode: self.options.mode,
 				palettes: self.options.palettes,
 				/**
-				 * @summary Handles the onChange event if one has been defined in the options.
-				 *
 				 * Handles the onChange event if one has been defined in the options and additionally
 				 * sets the background color for the toggler element.
 				 *
 				 * @since 3.5.0
 				 *
+				 * @ignore
+				 *
 				 * @param {Event} event    The event that's being called.
 				 * @param {HTMLElement} ui The HTMLElement containing the color picker.
 				 *
@@ -202,7 +206,7 @@
 			}
 		},
 		/**
-		 * @summary Binds event listeners to the color picker.
+		 * Binds event listeners to the color picker.
 		 *
 		 * @since 3.5.0
 		 *
@@ -214,7 +218,7 @@
 			var self = this;
 
 			/**
-			 * @summary Prevent any clicks inside this widget from leaking to the top and closing it.
+			 * Prevent any clicks inside this widget from leaking to the top and closing it.
 			 *
 			 * @since 3.5.0
 			 *
@@ -227,7 +231,7 @@
 			});
 
 			/**
-			 * @summary Open or close the color picker depending on the class.
+			 * Open or close the color picker depending on the class.
 			 *
 			 * @since 3.5
 			 */
@@ -240,8 +244,6 @@
 			});
 
 			/**
-			 * @summary Checks if value is empty when changing the color in the color picker.
-			 *
 			 * Checks if value is empty when changing the color in the color picker.
 			 * If so, the background color is cleared.
 			 *
@@ -265,8 +267,6 @@
 			});
 
 			/**
-			 * @summary Enables the user to clear or revert the color in the color picker.
-			 *
 			 * Enables the user to either clear the color in the color picker or revert back to the default color.
 			 *
 			 * @since 3.5.0
@@ -289,7 +289,7 @@
 			});
 		},
 		/**
-		 * @summary Opens the color picker dialog.
+		 * Opens the color picker dialog.
 		 *
 		 * @since 3.5.0
 		 *
@@ -305,7 +305,7 @@
 			$( 'body' ).trigger( 'click.wpcolorpicker' ).on( 'click.wpcolorpicker', this.close );
 		},
 		/**
-		 * @summary Closes the color picker dialog.
+		 * Closes the color picker dialog.
 		 *
 		 * @since 3.5.0
 		 *
@@ -321,8 +321,6 @@
 			$( 'body' ).off( 'click.wpcolorpicker', this.close );
 		},
 		/**
-		 * @summary Returns iris object or sets new color.
-		 *
 		 * Returns the iris object if no new color is provided. If a new color is provided, it sets the new color.
 		 *
 		 * @param newColor {string|*} The new color to use. Can be undefined.
@@ -338,8 +336,6 @@
 			this.element.iris( 'option', 'color', newColor );
 		},
 		/**
-		 * @summary Returns iris object or sets new default color.
-		 *
 		 * Returns the iris object if no new default color is provided.
 		 * If a new default color is provided, it sets the new default color.
 		 *