diff --git a/core/renderers/common/path_object.ts b/core/renderers/common/path_object.ts index c5ac5db20..12e23b6c4 100644 --- a/core/renderers/common/path_object.ts +++ b/core/renderers/common/path_object.ts @@ -170,14 +170,17 @@ export class PathObject implements IPathObject { * * @param enable True if highlighted. */ + updateHighlighted(enable: boolean) { if (enable) { this.svgPath.setAttribute( 'filter', 'url(#' + this.constants.embossFilterId + ')', ); + this.setClass_('blocklyHighlighted', true); } else { this.svgPath.setAttribute('filter', 'none'); + this.setClass_('blocklyHighlighted', false); } } diff --git a/core/renderers/geras/path_object.ts b/core/renderers/geras/path_object.ts index 6b058e5a7..321302a26 100644 --- a/core/renderers/geras/path_object.ts +++ b/core/renderers/geras/path_object.ts @@ -103,14 +103,10 @@ export class PathObject extends BasePathObject { } override updateHighlighted(highlighted: boolean) { + super.updateHighlighted(highlighted); if (highlighted) { - this.svgPath.setAttribute( - 'filter', - 'url(#' + this.constants.embossFilterId + ')', - ); this.svgPathLight.style.display = 'none'; } else { - this.svgPath.setAttribute('filter', 'none'); this.svgPathLight.style.display = 'inline'; } }