Don't show comments of collapsed blocks
Resolves
@@ -961,7 +961,7 @@ Blockly.WorkspaceSvg.prototype.customContextMenu = function(menuOptions) {
var allBlocks = Blockly.mainWorkspace.getAllBlocks();
Blockly.Events.setGroup(true);
for (var x = 0, block; block = allBlocks[x]; x++) {
- if (block.comment != null) {
+ if (block.comment != null && !block.isCollapsed()) {
block.comment.setVisible(true);
}
}
@@ -976,7 +976,7 @@ Blockly.WorkspaceSvg.prototype.customContextMenu = function(menuOptions) {
var allBlocks = Blockly.mainWorkspace.getAllBlocks();
Blockly.Events.setGroup(true);
for (var x = 0, block; block = allBlocks[x]; x++) {
- if (block.comment != null) {
+ if (block.comment != null && !block.isCollapsed()) {
block.comment.setVisible(false);
}
}
