mirror of
https://github.com/google/blockly.git
synced 2026-02-12 02:20:10 +01:00
fix: Add class to shadow blocks in Geras (#9564)
* fix: Add class to shadow blocks in Geras * chore: Remove errant logging
This commit is contained in:
@@ -81,12 +81,6 @@ export class PathObject extends BasePathObject {
|
||||
override applyColour(block: BlockSvg) {
|
||||
this.svgPathLight.style.display = '';
|
||||
this.svgPathDark.style.display = '';
|
||||
if (!this.style.colourTertiary) {
|
||||
throw new Error(
|
||||
'The renderer did not properly initialize the tertiary colour of ' +
|
||||
'the block style',
|
||||
);
|
||||
}
|
||||
this.svgPathLight.setAttribute('stroke', this.style.colourTertiary);
|
||||
this.svgPathDark.setAttribute('fill', this.colourDark);
|
||||
|
||||
@@ -111,17 +105,10 @@ export class PathObject extends BasePathObject {
|
||||
}
|
||||
|
||||
override updateShadow_(shadow: boolean) {
|
||||
super.updateShadow_(shadow);
|
||||
if (shadow) {
|
||||
this.svgPathLight.style.display = 'none';
|
||||
if (!this.style.colourSecondary) {
|
||||
throw new Error(
|
||||
'The renderer did not properly initialize the secondary colour ' +
|
||||
'of the block style block style',
|
||||
);
|
||||
}
|
||||
this.svgPathDark.setAttribute('fill', this.style.colourSecondary);
|
||||
this.svgPath.setAttribute('stroke', 'none');
|
||||
this.svgPath.setAttribute('fill', this.style.colourSecondary);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user