mirror of
https://github.com/google/blockly.git
synced 2026-01-11 19:07:08 +01:00
Fix three new and ten existing Closure warnings.
Current count: 638
This commit is contained in:
@@ -336,10 +336,10 @@ Blockly.Constants.Loops.CONTROL_FLOW_IN_LOOP_CHECK_MIXIN = {
|
||||
/**
|
||||
* Called whenever anything on the workspace changes.
|
||||
* Add warning if this flow block is not nested inside a loop.
|
||||
* @param {!Blockly.Events.Abstract} e Change event.
|
||||
* @param {!Blockly.Events.Abstract} _e Change event.
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
onchange: function(/* e */) {
|
||||
onchange: function(_e) {
|
||||
if (!this.workspace.isDragging || this.workspace.isDragging()) {
|
||||
return; // Don't change state at the start of a drag.
|
||||
}
|
||||
|
||||
@@ -1048,10 +1048,10 @@ Blockly.Blocks['procedures_ifreturn'] = {
|
||||
/**
|
||||
* Called whenever anything on the workspace changes.
|
||||
* Add warning if this flow block is not nested inside a loop.
|
||||
* @param {!Blockly.Events.Abstract} e Change event.
|
||||
* @param {!Blockly.Events.Abstract} _e Change event.
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
onchange: function(/* e */) {
|
||||
onchange: function(_e) {
|
||||
if (!this.workspace.isDragging || this.workspace.isDragging()) {
|
||||
return; // Don't change state at the start of a drag.
|
||||
}
|
||||
|
||||
@@ -142,7 +142,13 @@ Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_GETTER_SETTER_MI
|
||||
}
|
||||
}
|
||||
},
|
||||
onchange: function() {
|
||||
/**
|
||||
* Called whenever anything on the workspace changes.
|
||||
* Set the connection type for this block.
|
||||
* @param {!Blockly.Events.Abstract} _e Change event.
|
||||
* @this Blockly.Block
|
||||
*/
|
||||
onchange: function(_e) {
|
||||
var id = this.getFieldValue('VAR');
|
||||
var variableModel = this.workspace.getVariableById(id);
|
||||
if (this.type == 'variables_get_dynamic') {
|
||||
|
||||
@@ -704,11 +704,11 @@ Blockly.Connection.prototype.getShadowDom = function() {
|
||||
* and always return an empty list (the default).
|
||||
* {@link Blockly.RenderedConnection} overrides this behavior with a list
|
||||
* computed from the rendered positioning.
|
||||
* @param {number} maxLimit The maximum radius to another connection.
|
||||
* @param {number} _maxLimit The maximum radius to another connection.
|
||||
* @return {!Array.<!Blockly.Connection>} List of connections.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Connection.prototype.neighbours_ = function(/* maxLimit */) {
|
||||
Blockly.Connection.prototype.neighbours_ = function(_maxLimit) {
|
||||
return [];
|
||||
};
|
||||
|
||||
|
||||
@@ -869,7 +869,7 @@ Blockly.Field.prototype.getClickTarget_ = function() {
|
||||
/**
|
||||
* Return the absolute coordinates of the top-left corner of this field.
|
||||
* The origin (0,0) is the top-left corner of the page body.
|
||||
* @return {!Blockly.utils.Coordinate} Object with .x and .y properties.
|
||||
* @return {!goog.math.Coordinate} Object with .x and .y properties.
|
||||
* @private
|
||||
*/
|
||||
Blockly.Field.prototype.getAbsoluteXY_ = function() {
|
||||
|
||||
@@ -35,8 +35,8 @@ goog.provide('Blockly.utils.Coordinate');
|
||||
|
||||
/**
|
||||
* Class for representing coordinates and positions.
|
||||
* @param {number=} opt_x Left, defaults to 0.
|
||||
* @param {number=} opt_y Top, defaults to 0.
|
||||
* @param {number} x Left.
|
||||
* @param {number} y Top.
|
||||
* @struct
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
@@ -41,7 +41,6 @@ goog.provide('Blockly.utils.Rect');
|
||||
* @param {number} h Height.
|
||||
* @struct
|
||||
* @constructor
|
||||
* @implements {goog.math.IRect}
|
||||
*/
|
||||
Blockly.utils.Rect = function(x, y, w, h) {
|
||||
/** @type {number} */
|
||||
@@ -58,8 +57,7 @@ Blockly.utils.Rect = function(x, y, w, h) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Tests whether this rectangle entirely contains another rectangle or
|
||||
* coordinate.
|
||||
* Tests whether this rectangle contains a x/y coordinate.
|
||||
*
|
||||
* @param {number} x The x coordinate to test for containment.
|
||||
* @param {number} y The y coordinate to test for containment.
|
||||
|
||||
@@ -292,10 +292,10 @@ Blockly.WorkspaceCommentSvg.prototype.deleteMouseDown_ = function(e) {
|
||||
|
||||
/**
|
||||
* Handle a mouse-out on comment's delete icon.
|
||||
* @param {!Event} e Mouse out event.
|
||||
* @param {!Event} _e Mouse out event.
|
||||
* @private
|
||||
*/
|
||||
Blockly.WorkspaceCommentSvg.prototype.deleteMouseOut_ = function(/*e*/) {
|
||||
Blockly.WorkspaceCommentSvg.prototype.deleteMouseOut_ = function(_e) {
|
||||
// Restore highlight on the delete icon.
|
||||
Blockly.utils.removeClass(
|
||||
/** @type {!Element} */ (this.deleteIconBorder_),
|
||||
|
||||
Reference in New Issue
Block a user