mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
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:
committed by
GitHub
parent
91892ac303
commit
2619fb803c
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user