Suppress workspace comment module not included while Workspace comments are not bundled in. (#3303)

This commit is contained in:
Sam El-Husseini
2019-10-22 08:49:17 -04:00
committed by GitHub
parent b19e6a5fbf
commit 36d7e4ff8c
3 changed files with 10 additions and 0 deletions

View File

@@ -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) {

View File

@@ -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();

View File

@@ -371,6 +371,8 @@ Blockly.Xml.clearWorkspaceAndLoadFromXml = function(xml, workspace) {
* @param {!Element} xml XML DOM.
* @param {!Blockly.Workspace} workspace The workspace.
* @return {!Array.<string>} 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) {