mirror of
https://github.com/google/blockly.git
synced 2026-01-11 10:57:07 +01:00
Suppress workspace comment module not included while Workspace comments are not bundled in. (#3303)
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user