diff --git a/blocks/text.js b/blocks/text.js index 9d491bdc6..b98bd54be 100644 --- a/blocks/text.js +++ b/blocks/text.js @@ -622,7 +622,7 @@ Blockly.Constants.Text.QUOTE_IMAGE_MIXIN = { * closing double quote. The selected quote will be adapted for RTL blocks. * @param {boolean} open If the image should be open quote (“ in LTR). * Otherwise, a closing quote is used (” in LTR). - * @returns {!Blockly.FieldImage} The new field. + * @return {!Blockly.FieldImage} The new field. * @this Blockly.Block */ newQuote_: function(open) { diff --git a/core/block.js b/core/block.js index 5b07401eb..c5dc28fb3 100644 --- a/core/block.js +++ b/core/block.js @@ -814,7 +814,7 @@ Blockly.Block.prototype.setConnectionsHidden = function(hidden) { * Used to match connections between a block and its insertion marker. * @param {!Blockly.Block} otherBlock The other block to match against. * @param {!Blockly.Connection} conn The other connection to match. - * @return {Blockly.Connection} the matching connection on this block, or null. + * @return {Blockly.Connection} The matching connection on this block, or null. * @package */ Blockly.Block.prototype.getMatchingConnection = function(otherBlock, conn) { diff --git a/core/block_dragger.js b/core/block_dragger.js index 4e9eddd1d..9ba2e63eb 100644 --- a/core/block_dragger.js +++ b/core/block_dragger.js @@ -272,7 +272,7 @@ Blockly.BlockDragger.prototype.fireMoveEvent_ = function() { /** * Shut the trash can and, if necessary, delete the dragging block. * Should be called at the end of a block drag. - * @return {boolean} whether the block was deleted. + * @return {boolean} Whether the block was deleted. * @private */ Blockly.BlockDragger.prototype.maybeDeleteBlock_ = function() { diff --git a/core/block_svg.js b/core/block_svg.js index 86b6550aa..0fff3eda2 100644 --- a/core/block_svg.js +++ b/core/block_svg.js @@ -986,7 +986,7 @@ Blockly.BlockSvg.prototype.setBorderColour_ = function(rgb, colourTertiary) { * Sets the colour of shadow blocks. * @param {!string} rgb Primary colour of the block. * @param {?string} colourSecondary Colour for shadow block. - * @return {!string} hexColour The background colour of the block. + * @return {!string} The background colour of the block. */ Blockly.BlockSvg.prototype.setShadowColour_ = function(rgb, colourSecondary) { var hexColour; diff --git a/core/blockly.js b/core/blockly.js index e54a8311b..715a94f67 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -745,7 +745,7 @@ Blockly.updateBlockStyles_ = function(blocks) { /** * Gets the theme. - * @return {?Blockly.Theme} theme Theme for Blockly. + * @return {?Blockly.Theme} Theme for Blockly. */ Blockly.getTheme = function() { return this.theme_; diff --git a/core/bubble.js b/core/bubble.js index 7dd933f4a..e7cb9bdd5 100644 --- a/core/bubble.js +++ b/core/bubble.js @@ -462,7 +462,7 @@ Blockly.Bubble.prototype.layoutBubble_ = function() { * @param {!number} relativeMin.y The y-position of the relativeMin. * @param {!Object} metrics The metrics of the workspace the bubble will * appear in. - * @returns {number} The percentage of the bubble that is visible. + * @return {number} The percentage of the bubble that is visible. * @private */ Blockly.Bubble.prototype.getOverlap_ = function(relativeMin, metrics) { @@ -508,7 +508,7 @@ Blockly.Bubble.prototype.getOverlap_ = function(relativeMin, metrics) { * bubble is shown. * @param {!Object} metrics The metrics of the workspace the bubble will * appear in. - * @returns {number} The optimal horizontal position of the top-left corner + * @return {number} The optimal horizontal position of the top-left corner * of the bubble. * @private */ @@ -566,7 +566,7 @@ Blockly.Bubble.prototype.getOptimalRelativeLeft_ = function(metrics) { * bubble is shown. * @param {!Object} metrics The metrics of the workspace the bubble will * appear in. - * @returns {number} The optimal vertical position of the top-left corner + * @return {number} The optimal vertical position of the top-left corner * of the bubble. * @private */ diff --git a/core/bubble_dragger.js b/core/bubble_dragger.js index 26f5282c6..b601fd22f 100644 --- a/core/bubble_dragger.js +++ b/core/bubble_dragger.js @@ -151,7 +151,7 @@ Blockly.BubbleDragger.prototype.dragBubble = function(e, currentDragDeltaXY) { /** * Shut the trash can and, if necessary, delete the dragging bubble. * Should be called at the end of a bubble drag. - * @return {boolean} whether the bubble was deleted. + * @return {boolean} Whether the bubble was deleted. * @private */ Blockly.BubbleDragger.prototype.maybeDeleteBubble_ = function() { diff --git a/core/connection.js b/core/connection.js index f2a8ce468..f61d0e792 100644 --- a/core/connection.js +++ b/core/connection.js @@ -674,7 +674,7 @@ Blockly.Connection.prototype.setShadowDom = function(shadow) { /** * Return a connection's shadow block. - * @return {Element} shadow DOM representation of a block or null. + * @return {Element} Shadow DOM representation of a block or null. */ Blockly.Connection.prototype.getShadowDom = function() { return this.shadowDom_; diff --git a/core/dragged_connection_manager.js b/core/dragged_connection_manager.js index 211ec8bf4..7b7947a43 100644 --- a/core/dragged_connection_manager.js +++ b/core/dragged_connection_manager.js @@ -119,7 +119,7 @@ Blockly.DraggedConnectionManager.prototype.dispose = function() { /** * Return whether the block would be deleted if dropped immediately, based on * information from the most recent move event. - * @return {boolean} true if the block would be deleted if dropped immediately. + * @return {boolean} True if the block would be deleted if dropped immediately. * @package */ Blockly.DraggedConnectionManager.prototype.wouldDeleteBlock = function() { @@ -129,7 +129,7 @@ Blockly.DraggedConnectionManager.prototype.wouldDeleteBlock = function() { /** * Return whether the block would be connected if dropped immediately, based on * information from the most recent move event. - * @return {boolean} true if the block would be connected if dropped + * @return {boolean} True if the block would be connected if dropped * immediately. * @package */ @@ -220,7 +220,7 @@ Blockly.DraggedConnectionManager.prototype.addHighlighting_ = function() { /** * Populate the list of available connections on this block stack. This should * only be called once, at the beginning of a drag. - * @return {!Array.} a list of available + * @return {!Array.} A list of available * connections. * @private */ diff --git a/core/dropdowndiv.js b/core/dropdowndiv.js index 3186c3726..735220da2 100644 --- a/core/dropdowndiv.js +++ b/core/dropdowndiv.js @@ -297,7 +297,7 @@ Blockly.DropDownDiv.show = function(owner, primaryX, primaryY, secondaryX, secon /** * Get sizing info about the bounding element. - * @return {!Object} an object containing size information about the bounding + * @return {!Object} An object containing size information about the bounding * element (bounding box and width/height). * @private */ @@ -322,7 +322,7 @@ Blockly.DropDownDiv.getBoundsInfo_ = function() { * @param {number} primaryY Desired origin point y, in absolute px * @param {number} secondaryX Secondary/alternative origin point x, in absolute px * @param {number} secondaryY Secondary/alternative origin point y, in absolute px - * @returns {Object} Various final metrics, including rendered positions for drop-down and arrow. + * @return {Object} Various final metrics, including rendered positions for drop-down and arrow. */ Blockly.DropDownDiv.getPositionMetrics = function(primaryX, primaryY, secondaryX, secondaryY) { var boundsInfo = Blockly.DropDownDiv.getBoundsInfo_(); diff --git a/core/extensions.js b/core/extensions.js index 14b898055..7b0b3672d 100644 --- a/core/extensions.js +++ b/core/extensions.js @@ -398,7 +398,7 @@ Blockly.Extensions.checkDropdownOptionsInTable_ = function(block, dropdownName, * @param {string} msgTemplate The template form to of the message text, with * %1 placeholder. * @param {string} fieldName The field with the replacement text. - * @returns {Function} The extension function. + * @return {Function} The extension function. */ Blockly.Extensions.buildTooltipWithFieldText = function(msgTemplate, fieldName) { diff --git a/core/field.js b/core/field.js index 52bd66b23..5eacb275d 100644 --- a/core/field.js +++ b/core/field.js @@ -83,7 +83,7 @@ Blockly.Field.register = function(type, fieldClass) { * Blockly.Field.register. * @param {!Object} options A JSON object with a type and options specific * to the field type. - * @returns {?Blockly.Field} The new field instance or null if a field wasn't + * @return {?Blockly.Field} The new field instance or null if a field wasn't * found with the given type name * @package */ @@ -264,7 +264,7 @@ Blockly.Field.prototype.updateEditable = function() { * editable (e.g. text labels). Those fields are not serialized to XML. Other * fields may be editable, and therefore serialized, but may exist on * non-editable blocks. - * @return {boolean} whether this field is editable and on an editable block + * @return {boolean} Whether this field is editable and on an editable block */ Blockly.Field.prototype.isCurrentlyEditable = function() { return this.EDITABLE && !!this.sourceBlock_ && this.sourceBlock_.isEditable(); diff --git a/core/field_angle.js b/core/field_angle.js index d612effb8..647838502 100644 --- a/core/field_angle.js +++ b/core/field_angle.js @@ -58,7 +58,7 @@ goog.inherits(Blockly.FieldAngle, Blockly.FieldTextInput); /** * Construct a FieldAngle from a JSON arg object. * @param {!Object} options A JSON object with options (angle). - * @returns {!Blockly.FieldAngle} The new field instance. + * @return {!Blockly.FieldAngle} The new field instance. * @package * @nocollapse */ diff --git a/core/field_checkbox.js b/core/field_checkbox.js index 7d17028f5..bcd5b4f6d 100644 --- a/core/field_checkbox.js +++ b/core/field_checkbox.js @@ -50,7 +50,7 @@ goog.inherits(Blockly.FieldCheckbox, Blockly.Field); /** * Construct a FieldCheckbox from a JSON arg object. * @param {!Object} options A JSON object with options (checked). - * @returns {!Blockly.FieldCheckbox} The new field instance. + * @return {!Blockly.FieldCheckbox} The new field instance. * @package * @nocollapse */ diff --git a/core/field_colour.js b/core/field_colour.js index 54bfc532e..9838669fc 100644 --- a/core/field_colour.js +++ b/core/field_colour.js @@ -53,7 +53,7 @@ goog.inherits(Blockly.FieldColour, Blockly.Field); /** * Construct a FieldColour from a JSON arg object. * @param {!Object} options A JSON object with options (colour). - * @returns {!Blockly.FieldColour} The new field instance. + * @return {!Blockly.FieldColour} The new field instance. * @package * @nocollapse */ diff --git a/core/field_date.js b/core/field_date.js index b6de147a9..52d69cd80 100644 --- a/core/field_date.js +++ b/core/field_date.js @@ -61,7 +61,7 @@ goog.inherits(Blockly.FieldDate, Blockly.Field); /** * Construct a FieldDate from a JSON arg object. * @param {!Object} options A JSON object with options (date). - * @returns {!Blockly.FieldDate} The new field instance. + * @return {!Blockly.FieldDate} The new field instance. * @package * @nocollapse */ diff --git a/core/field_dropdown.js b/core/field_dropdown.js index 3751508f1..9eb3d04ac 100644 --- a/core/field_dropdown.js +++ b/core/field_dropdown.js @@ -68,7 +68,7 @@ goog.inherits(Blockly.FieldDropdown, Blockly.Field); /** * Construct a FieldDropdown from a JSON arg object. * @param {!Object} options A JSON object with options (options). - * @returns {!Blockly.FieldDropdown} The new field instance. + * @return {!Blockly.FieldDropdown} The new field instance. * @package * @nocollapse */ @@ -249,7 +249,7 @@ Blockly.FieldDropdown.prototype.createWidget_ = function(menu) { * the size of the checkmark that is displayed next to the currently selected * item. This means that the item text will be positioned directly under the * field text, rather than offset slightly. - * @returns {!Object} The bounding rectangle of the anchor, in window + * @return {!Object} The bounding rectangle of the anchor, in window * coordinates. * @private */ diff --git a/core/field_image.js b/core/field_image.js index e32bf7c1c..6878c17f4 100644 --- a/core/field_image.js +++ b/core/field_image.js @@ -69,7 +69,7 @@ goog.inherits(Blockly.FieldImage, Blockly.Field); * dereferencing any string table references. * @param {!Object} options A JSON object with options (src, width, height, * alt, and flipRtl). - * @returns {!Blockly.FieldImage} The new field instance. + * @return {!Blockly.FieldImage} The new field instance. * @package * @nocollapse */ diff --git a/core/field_label.js b/core/field_label.js index 0849d8764..7050c6b7a 100644 --- a/core/field_label.js +++ b/core/field_label.js @@ -52,7 +52,7 @@ goog.inherits(Blockly.FieldLabel, Blockly.Field); * Construct a FieldLabel from a JSON arg object, * dereferencing any string table references. * @param {!Object} options A JSON object with options (text, and class). - * @returns {!Blockly.FieldLabel} The new field instance. + * @return {!Blockly.FieldLabel} The new field instance. * @package * @nocollapse */ diff --git a/core/field_number.js b/core/field_number.js index 3b47584a1..7d4cf2759 100644 --- a/core/field_number.js +++ b/core/field_number.js @@ -56,7 +56,7 @@ goog.inherits(Blockly.FieldNumber, Blockly.FieldTextInput); * Construct a FieldNumber from a JSON arg object. * @param {!Object} options A JSON object with options (value, min, max, and * precision). - * @returns {!Blockly.FieldNumber} The new field instance. + * @return {!Blockly.FieldNumber} The new field instance. * @package * @nocollapse */ diff --git a/core/field_textinput.js b/core/field_textinput.js index a0d3897a9..a2f587d18 100644 --- a/core/field_textinput.js +++ b/core/field_textinput.js @@ -56,7 +56,7 @@ goog.inherits(Blockly.FieldTextInput, Blockly.Field); * dereferencing any string table references. * @param {!Object} options A JSON object with options (text, class, and * spellcheck). - * @returns {!Blockly.FieldTextInput} The new field instance. + * @return {!Blockly.FieldTextInput} The new field instance. * @package * @nocollapse */ diff --git a/core/field_variable.js b/core/field_variable.js index 9622374d6..7551929cf 100644 --- a/core/field_variable.js +++ b/core/field_variable.js @@ -67,7 +67,7 @@ goog.inherits(Blockly.FieldVariable, Blockly.FieldDropdown); * dereferencing any string table references. * @param {!Object} options A JSON object with options (variable, * variableTypes, and defaultType). - * @returns {!Blockly.FieldVariable} The new field instance. + * @return {!Blockly.FieldVariable} The new field instance. * @package * @nocollapse */ @@ -160,7 +160,7 @@ Blockly.FieldVariable.prototype.getText = function() { * Get the variable model for the selected variable. * Not guaranteed to be in the variable map on the workspace (e.g. if accessed * after the variable has been deleted). - * @return {?Blockly.VariableModel} the selected variable, or null if none was + * @return {?Blockly.VariableModel} The selected variable, or null if none was * selected. * @package */ diff --git a/core/flyout_horizontal.js b/core/flyout_horizontal.js index bcb0638b3..b8d931f59 100644 --- a/core/flyout_horizontal.js +++ b/core/flyout_horizontal.js @@ -317,7 +317,7 @@ Blockly.HorizontalFlyout.prototype.layout_ = function(contents, gaps) { * determine if a new block should be created or if the flyout should scroll. * @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has * moved from the position at mouse down, in pixel units. - * @return {boolean} true if the drag is toward the workspace. + * @return {boolean} True if the drag is toward the workspace. * @package */ Blockly.HorizontalFlyout.prototype.isDragTowardWorkspace = function( diff --git a/core/flyout_vertical.js b/core/flyout_vertical.js index abc8036b7..ad825649e 100644 --- a/core/flyout_vertical.js +++ b/core/flyout_vertical.js @@ -294,7 +294,7 @@ Blockly.VerticalFlyout.prototype.layout_ = function(contents, gaps) { * determine if a new block should be created or if the flyout should scroll. * @param {!goog.math.Coordinate} currentDragDeltaXY How far the pointer has * moved from the position at mouse down, in pixel units. - * @return {boolean} true if the drag is toward the workspace. + * @return {boolean} True if the drag is toward the workspace. * @package */ Blockly.VerticalFlyout.prototype.isDragTowardWorkspace = function( diff --git a/core/gesture.js b/core/gesture.js index 736047017..f9503b931 100644 --- a/core/gesture.js +++ b/core/gesture.js @@ -354,7 +354,7 @@ Blockly.Gesture.prototype.updateIsDraggingFromFlyout_ = function() { * drag radius is exceeded. It should be called no more than once per gesture. * If a bubble should be dragged this function creates the necessary * BubbleDragger and starts the drag. - * @return {boolean} true if a bubble is being dragged. + * @return {boolean} True if a bubble is being dragged. * @private */ Blockly.Gesture.prototype.updateIsDraggingBubble_ = function() { @@ -373,7 +373,7 @@ Blockly.Gesture.prototype.updateIsDraggingBubble_ = function() { * drag radius is exceeded. It should be called no more than once per gesture. * If a block should be dragged, either from the flyout or in the workspace, * this function creates the necessary BlockDragger and starts the drag. - * @return {boolean} true if a block is being dragged. + * @return {boolean} True if a block is being dragged. * @private */ Blockly.Gesture.prototype.updateIsDraggingBlock_ = function() { @@ -869,7 +869,7 @@ Blockly.Gesture.prototype.setStartFlyout_ = function(flyout) { /** * Whether this gesture is a click on a bubble. This should only be called when * ending a gesture (mouse up, touch end). - * @return {boolean} whether this gesture was a click on a bubble. + * @return {boolean} Whether this gesture was a click on a bubble. * @private */ Blockly.Gesture.prototype.isBubbleClick_ = function() { @@ -881,7 +881,7 @@ Blockly.Gesture.prototype.isBubbleClick_ = function() { /** * Whether this gesture is a click on a block. This should only be called when * ending a gesture (mouse up, touch end). - * @return {boolean} whether this gesture was a click on a block. + * @return {boolean} Whether this gesture was a click on a block. * @private */ Blockly.Gesture.prototype.isBlockClick_ = function() { @@ -894,7 +894,7 @@ Blockly.Gesture.prototype.isBlockClick_ = function() { /** * Whether this gesture is a click on a field. This should only be called when * ending a gesture (mouse up, touch end). - * @return {boolean} whether this gesture was a click on a field. + * @return {boolean} Whether this gesture was a click on a field. * @private */ Blockly.Gesture.prototype.isFieldClick_ = function() { @@ -907,7 +907,7 @@ Blockly.Gesture.prototype.isFieldClick_ = function() { /** * Whether this gesture is a click on a workspace. This should only be called * when ending a gesture (mouse up, touch end). - * @return {boolean} whether this gesture was a click on a workspace. + * @return {boolean} Whether this gesture was a click on a workspace. * @private */ Blockly.Gesture.prototype.isWorkspaceClick_ = function() { @@ -922,7 +922,7 @@ Blockly.Gesture.prototype.isWorkspaceClick_ = function() { * Whether this gesture is a drag of either a workspace or block. * This function is called externally to block actions that cannot be taken * mid-drag (e.g. using the keyboard to delete the selected blocks). - * @return {boolean} true if this gesture is a drag of a workspace or block. + * @return {boolean} True if this gesture is a drag of a workspace or block. * @package */ Blockly.Gesture.prototype.isDragging = function() { @@ -934,7 +934,7 @@ Blockly.Gesture.prototype.isDragging = function() { * Whether this gesture has already been started. In theory every mouse down * has a corresponding mouse up, but in reality it is possible to lose a * mouse up, leaving an in-process gesture hanging. - * @return {boolean} whether this gesture was a click on a workspace. + * @return {boolean} Whether this gesture was a click on a workspace. * @package */ Blockly.Gesture.prototype.hasStarted = function() { diff --git a/core/insertion_marker_manager.js b/core/insertion_marker_manager.js index 367fff46a..e0572e4a8 100644 --- a/core/insertion_marker_manager.js +++ b/core/insertion_marker_manager.js @@ -178,7 +178,7 @@ Blockly.InsertionMarkerManager.prototype.dispose = function() { /** * Return whether the block would be deleted if dropped immediately, based on * information from the most recent move event. - * @return {boolean} true if the block would be deleted if dropped immediately. + * @return {boolean} True if the block would be deleted if dropped immediately. * @package */ Blockly.InsertionMarkerManager.prototype.wouldDeleteBlock = function() { @@ -188,7 +188,8 @@ Blockly.InsertionMarkerManager.prototype.wouldDeleteBlock = function() { /** * Return whether the block would be connected if dropped immediately, based on * information from the most recent move event. - * @return {boolean} true if the block would be connected if dropped immediately. + * @return {boolean} True if the block would be connected if dropped + * immediately. * @package */ Blockly.InsertionMarkerManager.prototype.wouldConnectBlock = function() { @@ -294,7 +295,7 @@ Blockly.InsertionMarkerManager.prototype.createMarkerBlock_ = function(sourceBlo * only be called once, at the beginning of a drag. * If the stack has more than one block, this function will populate * lastOnStack_ and create the corresponding insertion marker. - * @return {!Array.} a list of available + * @return {!Array.} A list of available * connections. * @private */ @@ -320,7 +321,7 @@ Blockly.InsertionMarkerManager.prototype.initAvailableConnections_ = function() * connection, and a radius. Returned by getCandidate_. * @param {!goog.math.Coordinate} dxy Position relative to drag start, * in workspace units. - * @return {boolean} whether the preview should be updated. + * @return {boolean} Whether the preview should be updated. * @private */ Blockly.InsertionMarkerManager.prototype.shouldUpdatePreviews_ = function( @@ -365,7 +366,7 @@ Blockly.InsertionMarkerManager.prototype.shouldUpdatePreviews_ = function( * closest connection. * @param {!goog.math.Coordinate} dxy Position relative to drag start, * in workspace units. - * @return {!Object} candidate An object containing a local connection, a closest + * @return {!Object} An object containing a local connection, a closest * connection, and a radius. */ Blockly.InsertionMarkerManager.prototype.getCandidate_ = function(dxy) { diff --git a/core/msg.js b/core/msg.js index f6e520548..6544f3029 100644 --- a/core/msg.js +++ b/core/msg.js @@ -43,7 +43,7 @@ goog.getMsgOrig = goog.getMsg; * Used infrequently, only known case is TODAY button in date picker. * @param {string} str Translatable string, places holders in the form {$foo}. * @param {Object.=} opt_values Maps place holder name to value. - * @return {string} message with placeholders filled. + * @return {string} Message with placeholders filled. * @suppress {duplicate} */ goog.getMsg = function(str, opt_values) { diff --git a/core/theme.js b/core/theme.js index 003d3096b..fb8fcbda9 100644 --- a/core/theme.js +++ b/core/theme.js @@ -51,7 +51,7 @@ Blockly.Theme.prototype.setAllBlockStyles = function(blockStyles) { /** * Gets a list of all the block style names. - * @return {Array.} styleName List of blockstyle names. + * @return {Array.} List of blockstyle names. */ Blockly.Theme.prototype.getAllBlockStyles = function() { return this.blockStyles_; diff --git a/core/touch.js b/core/touch.js index 9bb1b5e30..6b54bb8a7 100644 --- a/core/touch.js +++ b/core/touch.js @@ -210,7 +210,7 @@ Blockly.Touch.setClientFromTouch = function(e) { /** * Check whether a given event is a mouse or touch event. * @param {!Event} e An event. - * @return {boolean} true if it is a mouse or touch event; false otherwise. + * @return {boolean} True if it is a mouse or touch event; false otherwise. */ Blockly.Touch.isMouseOrTouchEvent = function(e) { return Blockly.utils.startsWith(e.type, 'touch') || @@ -221,7 +221,7 @@ Blockly.Touch.isMouseOrTouchEvent = function(e) { /** * Check whether a given event is a touch event or a pointer event. * @param {!Event} e An event. - * @return {boolean} true if it is a touch event; false otherwise. + * @return {boolean} True if it is a touch event; false otherwise. */ Blockly.Touch.isTouchEvent = function(e) { return Blockly.utils.startsWith(e.type, 'touch') || diff --git a/core/touch_gesture.js b/core/touch_gesture.js index 94450dd3a..fb84ed727 100644 --- a/core/touch_gesture.js +++ b/core/touch_gesture.js @@ -206,7 +206,7 @@ Blockly.TouchGesture.prototype.handleUp = function(e) { /** * Whether this gesture is part of a multi-touch gesture. - * @return {boolean} whether this gesture is part of a multi-touch gesture. + * @return {boolean} Whether this gesture is part of a multi-touch gesture. * @package */ Blockly.TouchGesture.prototype.isMultiTouch = function() { @@ -301,7 +301,7 @@ Blockly.TouchGesture.prototype.handleTouchEnd = function(e) { /** * Helper function returning the current touch point coordinate. * @param {!Event} e A touch or pointer event. - * @return {goog.math.Coordinate} the current touch point coordinate + * @return {goog.math.Coordinate} The current touch point coordinate * @package */ Blockly.TouchGesture.prototype.getTouchPoint = function(e) { diff --git a/core/trashcan.js b/core/trashcan.js index 29f4a6bba..2cadcf026 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -460,7 +460,7 @@ Blockly.Trashcan.prototype.mouseOut_ = function() { /** * Handle a BLOCK_DELETE event. Adds deleted blocks oldXml to the content array. - * @returns {!Function} Function to call when a block is deleted. + * @return {!Function} Function to call when a block is deleted. * @private */ Blockly.Trashcan.prototype.onDelete_ = function() { @@ -495,7 +495,7 @@ Blockly.Trashcan.prototype.onDelete_ = function() { * content array. * @param {!Element} xml An XML tree defining the block and any * connected child blocks. - * @returns {!string} Text representing the XML tree, cleaned of all unnecessary + * @return {!string} Text representing the XML tree, cleaned of all unnecessary * attributes. * @private */ diff --git a/core/utils.js b/core/utils.js index 42ef4ccd4..367e11314 100644 --- a/core/utils.js +++ b/core/utils.js @@ -817,7 +817,7 @@ Blockly.utils.wrapToText_ = function(words, wordBreaks) { /** * Check if 3D transforms are supported by adding an element * and attempting to set the property. - * @return {boolean} true if 3D transforms are supported. + * @return {boolean} True if 3D transforms are supported. */ Blockly.utils.is3dSupported = function() { if (Blockly.utils.is3dSupported.cached_ !== undefined) { @@ -921,7 +921,7 @@ Blockly.utils.setCssTransform = function(node, transform) { /** * Get the position of the current viewport in window coordinates. This takes * scroll into account. - * @return {!Object} an object containing window width, height, and scroll + * @return {!Object} An object containing window width, height, and scroll * position in window coordinates. * @package */ @@ -1008,7 +1008,7 @@ Blockly.utils.containsNode = function(parent, descendant) { * @param {boolean=} opt_stripFollowing Optionally ignore all following * statements (blocks that are not inside a value or statement input * of the block). - * @returns {!Object} Map of types to type counts for descendants of the bock. + * @return {!Object} Map of types to type counts for descendants of the bock. */ Blockly.utils.getBlockTypeCounts = function(block, opt_stripFollowing) { var typeCountsMap = Object.create(null); @@ -1035,7 +1035,7 @@ Blockly.utils.getBlockTypeCounts = function(block, opt_stripFollowing) { * @param {Number} lowerBound The desired lower bound. * @param {Number} number The number to clamp. * @param {Number} upperBound The desired upper bound. - * @return {Number} the clamped number + * @return {Number} The clamped number. * @package */ Blockly.utils.clampNumber = function(lowerBound, number, upperBound) { diff --git a/core/workspace.js b/core/workspace.js index f8a7739bd..d8703f8e0 100644 --- a/core/workspace.js +++ b/core/workspace.js @@ -159,7 +159,7 @@ Blockly.Workspace.SCAN_ANGLE = 3; * compare. * @param {!Blockly.Block | !Blockly.WorkspaceComment} b The second object to * compare. - * @returns {number} The comparison value. This tells Array.sort() how to change + * @return {number} The comparison value. This tells Array.sort() how to change * object a's index. * @private */ @@ -442,7 +442,7 @@ Blockly.Workspace.prototype.variableIndexOf = function(_name) { * @param {!string} name The name to check for. * @param {string=} opt_type The type of the variable. If not provided it * defaults to the empty string, which is a specific type. - * @return {?Blockly.VariableModel} the variable with the given name. + * @return {?Blockly.VariableModel} The variable with the given name. */ // TODO (#1199): Possibly delete this function. Blockly.Workspace.prototype.getVariable = function(name, opt_type) { @@ -545,7 +545,7 @@ Blockly.Workspace.prototype.remainingCapacityOfType = function(type) { * than the remaining capacity for that type, it returns false. * @param {!Object} typeCountsMap A map of types to counts (usually representing * blocks to be created). - * @returns {boolean} True if there is capacity for the given map, + * @return {boolean} True if there is capacity for the given map, * false otherwise. */ Blockly.Workspace.prototype.isCapacityAvailable = function(typeCountsMap) { @@ -568,7 +568,7 @@ Blockly.Workspace.prototype.isCapacityAvailable = function(typeCountsMap) { /** * Checks if the workspace has any limits on the maximum number of blocks, * or the maximum number of blocks of specific types. - * @returns {boolean} True if it has block limits, false otherwise. + * @return {boolean} True if it has block limits, false otherwise. */ Blockly.Workspace.prototype.hasBlockLimits = function() { return this.options.maxBlocks != Infinity || !!this.options.maxInstances; diff --git a/core/workspace_comment.js b/core/workspace_comment.js index 514775040..519b06a3f 100644 --- a/core/workspace_comment.js +++ b/core/workspace_comment.js @@ -137,7 +137,7 @@ Blockly.WorkspaceComment.prototype.dispose = function() { /** * Get comment height. - * @return {number} comment height. + * @return {number} Comment height. * @package */ Blockly.WorkspaceComment.prototype.getHeight = function() { @@ -146,7 +146,7 @@ Blockly.WorkspaceComment.prototype.getHeight = function() { /** * Set comment height. - * @param {number} height comment height. + * @param {number} height Comment height. * @package */ Blockly.WorkspaceComment.prototype.setHeight = function(height) { @@ -155,7 +155,7 @@ Blockly.WorkspaceComment.prototype.setHeight = function(height) { /** * Get comment width. - * @return {number} comment width. + * @return {number} Comment width. * @package */ Blockly.WorkspaceComment.prototype.getWidth = function() { diff --git a/core/workspace_svg.js b/core/workspace_svg.js index 9f9e48829..fdc33acba 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1266,7 +1266,7 @@ Blockly.WorkspaceSvg.prototype.isDraggable = function() { * Should the workspace have bounded content? Used to tell if the * workspace's content should be sized so that it can move (bounded) or not * (exact sizing). - * @returns {boolean} True if the workspace should be bounded, false otherwise. + * @return {boolean} True if the workspace should be bounded, false otherwise. * @package */ Blockly.WorkspaceSvg.prototype.isContentBounded = function() { @@ -1285,7 +1285,7 @@ Blockly.WorkspaceSvg.prototype.isContentBounded = function() { * through zooming with the scroll wheel (since the zoom is centered on the * mouse position). This does not include zooming with the zoom controls * since the X Y coordinates are decided programmatically. - * @returns {boolean} True if the workspace is movable, false otherwise. + * @return {boolean} True if the workspace is movable, false otherwise. * @package */ Blockly.WorkspaceSvg.prototype.isMovable = function() {