feat: Add a blocklyNotEditable CSS class to the block's root SVG (#8391)

* feat: added blockyNotEditable CSS class to the block's root SVG

* Run linter to fix code style issues
This commit is contained in:
dianaprahoveanu23
2024-07-23 16:33:59 +01:00
committed by GitHub
parent 91892ac303
commit 2619fb803c

View File

@@ -732,6 +732,13 @@ export class BlockSvg
*/
override setEditable(editable: boolean) {
super.setEditable(editable);
if (editable) {
dom.removeClass(this.svgGroup_, 'blocklyNotEditable');
} else {
dom.addClass(this.svgGroup_, 'blocklyNotEditable');
}
const icons = this.getIcons();
for (let i = 0; i < icons.length; i++) {
icons[i].updateEditable();