Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions core/block_svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,20 @@ export class BlockSvg
}
}

/**
* Add blocklyNotDeletable class when block is not deletable
* Or remove class when block is deletable
*/
override setDeletable(deletable: boolean) {
super.setDeletable(deletable);

if (deletable) {
dom.removeClass(this.svgGroup_, 'blocklyNotDeletable');
} else {
dom.addClass(this.svgGroup_, 'blocklyNotDeletable');
}
}

/**
* Set whether the block is highlighted or not. Block highlighting is
* often used to visually mark blocks currently being executed.
Expand Down