mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
Misc JSDoc fixes. (#2747)
This commit is contained in:
committed by
Sam El-Husseini
parent
abc452109e
commit
6aedfab4d1
@@ -914,7 +914,7 @@ Blockly.Block.prototype.getColourBorder = function() {
|
||||
var colour = this.getColour();
|
||||
return {
|
||||
colourBorder: null,
|
||||
colourLight: Blockly.utils.colour.blend('white',colour, 0.3),
|
||||
colourLight: Blockly.utils.colour.blend('white', colour, 0.3),
|
||||
colourDark: Blockly.utils.colour.blend('black', colour, 0.2)
|
||||
};
|
||||
};
|
||||
|
||||
@@ -245,13 +245,13 @@ Blockly.FieldColour.COLUMNS = 7;
|
||||
* Set a custom colour grid for this field.
|
||||
* @param {Array.<string>} colours Array of colours for this block,
|
||||
* or null to use default (Blockly.FieldColour.COLOURS).
|
||||
* @param {Array.<string>} opt_titles Optional array of colour tooltips,
|
||||
* @param {Array.<string>=} opt_titles Optional array of colour tooltips,
|
||||
* or null to use default (Blockly.FieldColour.TITLES).
|
||||
* @return {!Blockly.FieldColour} Returns itself (for method chaining).
|
||||
*/
|
||||
Blockly.FieldColour.prototype.setColours = function(colours, opt_titles) {
|
||||
this.colours_ = colours;
|
||||
if (opt_titles !== undefined) {
|
||||
if (opt_titles) {
|
||||
this.titles_ = opt_titles;
|
||||
}
|
||||
return this;
|
||||
|
||||
@@ -29,7 +29,7 @@ goog.require('Blockly.Cursor');
|
||||
/**
|
||||
* Class for a cursor.
|
||||
* @param {!Blockly.Workspace} workspace The workspace to sit in.
|
||||
* @param {?boolean} opt_isImmovable True if the cursor cannot be moved with
|
||||
* @param {boolean=} opt_isImmovable True if the cursor cannot be moved with
|
||||
* calls to prev/next/in/out. This is called a marker.
|
||||
* @extends {Blockly.Cursor}
|
||||
* @constructor
|
||||
|
||||
@@ -52,7 +52,7 @@ Blockly.utils.svgPaths.point = function(x, y) {
|
||||
* These coordinates are unitless and hence in the user coordinate system.
|
||||
* @param {string} command The command to use.
|
||||
* Should be one of: c, C, s, S, q, Q.
|
||||
* @param {string} points An array containing all of the points to pass to the
|
||||
* @param {!Array.<string>} points An array containing all of the points to pass to the
|
||||
* curve command, in order. The points are represented as strings of the
|
||||
* format ' x, y '.
|
||||
* @return {string} A string defining one or more Bezier curves. See the MDN
|
||||
|
||||
@@ -510,7 +510,7 @@ Blockly.Xml.domToBlock = function(xmlBlock, workspace) {
|
||||
var swap = xmlBlock;
|
||||
// Closure Compiler complains here because the arguments are reversed.
|
||||
/** @suppress {checkTypes} */
|
||||
xmlBlock = workspace;
|
||||
xmlBlock = /** @type {!Element} */ (workspace);
|
||||
workspace = swap;
|
||||
console.warn('Deprecated call to Blockly.Xml.domToBlock, ' +
|
||||
'swap the arguments.');
|
||||
|
||||
@@ -49,8 +49,8 @@ BlockDefinitionExtractor.buildBlockFactoryWorkspace = function(block) {
|
||||
* inner text.
|
||||
*
|
||||
* @param {string} name New element tag name.
|
||||
* @param {Map<String,String>} opt_attrs Optional list of attributes.
|
||||
* @param {string?} opt_text Optional inner text.
|
||||
* @param {!Object.<string, string>=} opt_attrs Optional list of attributes.
|
||||
* @param {string=} opt_text Optional inner text.
|
||||
* @return {!Element} The newly created element.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
* Block Library Controller Class
|
||||
* @param {string} blockLibraryName Desired name of Block Library, also used
|
||||
* to create the key for where it's stored in local storage.
|
||||
* @param {!BlockLibraryStorage} opt_blockLibraryStorage Optional storage
|
||||
* @param {!BlockLibraryStorage=} opt_blockLibraryStorage Optional storage
|
||||
* object that allows user to import a block library.
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* Represents a block library's storage.
|
||||
* @param {string} blockLibraryName Desired name of Block Library, also used
|
||||
* to create the key for where it's stored in local storage.
|
||||
* @param {Object} opt_blocks Object mapping block type to XML.
|
||||
* @param {!Object=} opt_blocks Object mapping block type to XML.
|
||||
* @constructor
|
||||
*/
|
||||
function BlockLibraryStorage(blockLibraryName, opt_blocks) {
|
||||
|
||||
Reference in New Issue
Block a user