From 203e422977a39efca29ed1fb00c74d6eaa3f973d Mon Sep 17 00:00:00 2001 From: Tejas Ghatule <141946130+CodeMaverick2@users.noreply.github.com> Date: Wed, 31 Jul 2024 06:42:48 +0530 Subject: [PATCH] feat: add the block's type as a CSS class to the block's root SVG (#8428) * feat: Added the block's type as a CSS class to the block's root SVG https://github.com/google/blockly/issues/8268 * fix: Added the block type as a CSS class to the blocks root SVG https://github.com/google/blockly/issues/8268 --- core/block_svg.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/block_svg.ts b/core/block_svg.ts index 7bdbd5b79..acead527a 100644 --- a/core/block_svg.ts +++ b/core/block_svg.ts @@ -184,6 +184,9 @@ export class BlockSvg this.workspace = workspace; this.svgGroup_ = dom.createSvgElement(Svg.G, {}); + if (prototypeName) { + dom.addClass(this.svgGroup_, prototypeName); + } /** A block style object. */ this.style = workspace.getRenderer().getConstants().getBlockStyle(null);