Some common functions

This commit is contained in:
barsdeveloper
2023-05-06 23:38:14 +02:00
parent a80bf61c88
commit c3d94f8cde
6 changed files with 143 additions and 4 deletions

View File

@@ -287,11 +287,13 @@ export default class PinEntity extends IEntity {
/** @return {CSSResult} */
pinColor() {
if (this.PinType.PinCategory === "mask") {
if (this.PinType.PinCategory == "mask") {
const result = Configuration.pinColor[this.PinType.PinSubCategory]
if (result) {
return result
}
} else if (this.PinType.PinCategory == "optional") {
return Configuration.pinColorMaterial
}
return Configuration.pinColor[this.getType()]
?? Configuration.pinColor[this.PinType.PinCategory.toLowerCase()]