Add requireType calls for Blockly.WorkspaceComment and Blockly.WorkspaceCommentSvg

This commit is contained in:
kozbial
2021-08-05 09:35:12 -07:00
committed by Monica Kozbial
parent 50a99ce515
commit b834d9026b
10 changed files with 71 additions and 62 deletions

View File

@@ -36,6 +36,7 @@ goog.require('Blockly.WidgetDiv');
goog.requireType('Blockly.BlocklyOptions');
goog.requireType('Blockly.BlockSvg');
goog.requireType('Blockly.WorkspaceCommentSvg');
/**
@@ -215,7 +216,9 @@ Blockly.extractObjectFromEvent_ = function(workspace, e) {
break;
case Blockly.Events.COMMENT_CREATE:
case Blockly.Events.COMMENT_MOVE:
object = workspace.getCommentById(e.commentId);
object = (
/** @type {?Blockly.WorkspaceCommentSvg} */
(workspace.getCommentById(e.commentId)));
break;
}
return object;