You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
527 B
20 lines
527 B
export interface Style {
|
|
textColor?: string;
|
|
fillColor?: string;
|
|
}
|
|
|
|
export class CombinedStyle implements Style {
|
|
public readonly textColor?: string;
|
|
public readonly fillColor?: string;
|
|
constructor(rules: Style[], flags: any[]) {
|
|
for (let i = 0; i < rules.length; i++) {
|
|
if (flags[i]) {
|
|
const textColor = rules[i].textColor;
|
|
const fillColor = rules[i].fillColor;
|
|
this.textColor = textColor || this.textColor;
|
|
this.fillColor = fillColor || this.fillColor;
|
|
}
|
|
}
|
|
}
|
|
}
|