Move entities decode methods to entities

This commit is contained in:
barsdeveloper
2023-01-28 23:33:08 +01:00
parent daf6abf038
commit 2ccb0dc519
15 changed files with 538 additions and 520 deletions

View File

@@ -22,7 +22,10 @@ import Utility from "../Utility"
import Vector2DEntity from "./Vector2DEntity"
import VectorEntity from "./VectorEntity"
/** @typedef {import("./IEntity").AnyValue} AnyValue */
/**
* @typedef {import("./IEntity").AnyValue} AnyValue
* @typedef {import("lit").CSSResult} CSSResult
*/
/** @template {AnyValue} T */
export default class PinEntity extends IEntity {
@@ -278,4 +281,11 @@ export default class PinEntity extends IEntity {
getSubCategory() {
return this.PinType.PinSubCategoryObject.path
}
/** @return {CSSResult} */
pinColor() {
return Configuration.pinColor[this.getType()]
?? Configuration.pinColor[this.PinType.PinCategory]
?? Configuration.pinColor["default"]
}
}