Fix allowTransparency not working when set after ctor

Fixes #3898
This commit is contained in:
Daniel Imms
2022-07-10 08:54:56 -07:00
parent b6885a67e7
commit e2b8002d4a
3 changed files with 10 additions and 5 deletions
+8 -3
View File
@@ -111,9 +111,14 @@ export class ColorManager implements IColorManager {
this._updateRestoreColors();
}
public onOptionsChange(key: string): void {
if (key === 'minimumContrastRatio') {
this._contrastCache.clear();
public onOptionsChange(key: string, value: any): void {
switch (key) {
case 'minimumContrastRatio':
this._contrastCache.clear();
break;
case 'allowTransparency':
this.allowTransparency = value;
break;
}
}