Skip to content

Commit

Permalink
add collapse option to block context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
jwklong authored Dec 8, 2024
1 parent 97cfd95 commit d3cf1d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/block_svg.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,11 @@ Blockly.BlockSvg.prototype.showContextMenu_ = function(e) {
var block = this;
var menuOptions = [];
if (this.isDeletable() && this.isMovable() && !block.isInFlyout) {
menuOptions.push(
Blockly.ContextMenu.blockDuplicateOption(block, e));
menuOptions.push(Blockly.ContextMenu.blockDuplicateOption(block, e));
if (this.isEditable() && this.workspace.options.comments) {
menuOptions.push(Blockly.ContextMenu.blockCommentOption(block));
}
menuOptions.push(Blockly.ContextMenu.blockCollapseOption(block));
menuOptions.push(Blockly.ContextMenu.blockDeleteOption(block));
} else if (this.parentBlock_ && this.isShadow_ && this.type !== 'polygon') {
this.parentBlock_.showContextMenu_(e);
Expand Down

0 comments on commit d3cf1d9

Please sign in to comment.