mirror of
https://github.com/google/blockly.git
synced 2026-01-06 16:40:07 +01:00
fix: move Theme to use a Partial type for BlockStyle (#6532)
* fix: move theme to use Partial type * chore: remove useless error throwing * chore: format * chore: update validatedBlockStyle_ to use Partial
This commit is contained in:
@@ -137,10 +137,6 @@ export class PathObject implements IPathObject {
|
||||
* @internal
|
||||
*/
|
||||
applyColour(block: BlockSvg) {
|
||||
if (!this.style.colourTertiary) {
|
||||
throw new Error(
|
||||
'The renderer did not properly initialize the block style');
|
||||
}
|
||||
this.svgPath.setAttribute('stroke', this.style.colourTertiary);
|
||||
this.svgPath.setAttribute('fill', this.style.colourPrimary);
|
||||
|
||||
@@ -199,10 +195,6 @@ export class PathObject implements IPathObject {
|
||||
*/
|
||||
protected updateShadow_(shadow: boolean) {
|
||||
if (shadow) {
|
||||
if (!this.style.colourSecondary) {
|
||||
throw new Error(
|
||||
'The renderer did not properly initialize the block style');
|
||||
}
|
||||
this.svgPath.setAttribute('stroke', 'none');
|
||||
this.svgPath.setAttribute('fill', this.style.colourSecondary);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user