mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
feat: added blocklyNotDetetable class to block_svg (#8406)
* feat: added blocklynotdetetable class to block_svg * feat: added blocklynotdetetable class to block_svg
This commit is contained in:
@@ -1079,6 +1079,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.
|
||||
|
||||
Reference in New Issue
Block a user