mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Resolve remaining compiler type warnings (#3334)
* Resolve remaining compiler warnings with inconsistent types.
This commit is contained in:
@@ -64,14 +64,15 @@ Blockly.Grid = function(pattern, options) {
|
||||
* @type {SVGElement}
|
||||
* @private
|
||||
*/
|
||||
this.line1_ = pattern.firstChild;
|
||||
this.line1_ = /** @type {SVGElement} */ (pattern.firstChild);
|
||||
|
||||
/**
|
||||
* The vertical grid line, if it exists.
|
||||
* @type {SVGElement}
|
||||
* @private
|
||||
*/
|
||||
this.line2_ = this.line1_ && this.line1_.nextSibling;
|
||||
this.line2_ = this.line1_ &&
|
||||
(/** @type {SVGElement} */ (this.line1_.nextSibling));
|
||||
|
||||
/**
|
||||
* Whether blocks should snap to the grid.
|
||||
@@ -154,7 +155,7 @@ Blockly.Grid.prototype.update = function(scale) {
|
||||
/**
|
||||
* Set the attributes on one of the lines in the grid. Use this to update the
|
||||
* length and stroke width of the grid lines.
|
||||
* @param {!SVGElement} line Which line to update.
|
||||
* @param {SVGElement} line Which line to update.
|
||||
* @param {number} width The new stroke size (in px).
|
||||
* @param {number} x1 The new x start position of the line (in px).
|
||||
* @param {number} x2 The new x end position of the line (in px).
|
||||
|
||||
Reference in New Issue
Block a user