mirror of
https://github.com/google/blockly.git
synced 2026-01-10 18:37:09 +01:00
feat: added blocklyHighlighted CSS class to highlighted block's root… (#8407)
* fix: added 'blocklyHighlighted' CSS class to highlighted block's root svg * fix: added 'blocklyHighlighted' CSS class to highlighted block's root svg * fix: added 'blocklyHighlighted' CSS class to highlighted block's root svg * fix: added 'blocklyHighlighted' CSS class to highlighted block's root svg * fix: added 'blocklyHighlighted' CSS class to highlighted block's root svg
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user