From 36d7e4ff8cddc972969e323ba9fc1781b6b41665 Mon Sep 17 00:00:00 2001 From: Sam El-Husseini Date: Tue, 22 Oct 2019 08:49:17 -0400 Subject: [PATCH] Suppress workspace comment module not included while Workspace comments are not bundled in. (#3303) --- core/contextmenu.js | 6 ++++++ core/workspace_svg.js | 2 ++ core/xml.js | 2 ++ 3 files changed, 10 insertions(+) diff --git a/core/contextmenu.js b/core/contextmenu.js index 5d19bd0f7..e1eee486b 100644 --- a/core/contextmenu.js +++ b/core/contextmenu.js @@ -300,6 +300,8 @@ Blockly.ContextMenu.blockCommentOption = function(block) { * right-click originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package + * @suppress {checkTypes} Suppress checks while workspace comments are not + * bundled in. */ Blockly.ContextMenu.commentDeleteOption = function(comment) { var deleteOption = { @@ -320,6 +322,8 @@ Blockly.ContextMenu.commentDeleteOption = function(comment) { * right-click originated. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package + * @suppress {checkTypes} Suppress checks while workspace comments are not + * bundled in. */ Blockly.ContextMenu.commentDuplicateOption = function(comment) { var duplicateOption = { @@ -339,6 +343,8 @@ Blockly.ContextMenu.commentDuplicateOption = function(comment) { * @param {!Event} e The right-click mouse event. * @return {!Object} A menu option, containing text, enabled, and a callback. * @package + * @suppress {strictModuleDepCheck,checkTypes} Suppress checks while workspace + * comments are not bundled in. */ Blockly.ContextMenu.workspaceCommentOption = function(ws, e) { if (!Blockly.WorkspaceCommentSvg) { diff --git a/core/workspace_svg.js b/core/workspace_svg.js index fd9fba79a..a88339f39 100644 --- a/core/workspace_svg.js +++ b/core/workspace_svg.js @@ -1261,6 +1261,8 @@ Blockly.WorkspaceSvg.prototype.pasteBlock_ = function(xmlBlock) { * Paste the provided comment onto the workspace. * @param {!Element} xmlComment XML workspace comment element. * @private + * @suppress {checkTypes} Suppress checks while workspace comments are not + * bundled in. */ Blockly.WorkspaceSvg.prototype.pasteWorkspaceComment_ = function(xmlComment) { Blockly.Events.disable(); diff --git a/core/xml.js b/core/xml.js index 1125e1a7f..f581da08f 100644 --- a/core/xml.js +++ b/core/xml.js @@ -371,6 +371,8 @@ Blockly.Xml.clearWorkspaceAndLoadFromXml = function(xml, workspace) { * @param {!Element} xml XML DOM. * @param {!Blockly.Workspace} workspace The workspace. * @return {!Array.} An array containing new block IDs. + * @suppress {strictModuleDepCheck} Suppress module check while workspace + * comments are not bundled in. */ Blockly.Xml.domToWorkspace = function(xml, workspace) { if (xml instanceof Blockly.Workspace) {