forked from MapComplete/MapComplete
Fix: cleanup various typing mistakes, remove unused variables, add error handling in opening hours related special visualisations
This commit is contained in:
parent
35cd979b5e
commit
091b7fbba5
16 changed files with 103 additions and 58 deletions
|
|
@ -12,8 +12,6 @@ import { VariableUiElement } from "../../UI/Base/VariableUIElement"
|
|||
import { TagRenderingConfigJson } from "./Json/TagRenderingConfigJson"
|
||||
import SvelteUIElement from "../../UI/Base/SvelteUIElement"
|
||||
import DynamicMarker from "../../UI/Map/DynamicMarker.svelte"
|
||||
import { UIElement } from "../../UI/UIElement"
|
||||
import Img from "../../UI/Base/Img"
|
||||
|
||||
export class IconConfig extends WithContextLoader {
|
||||
public static readonly defaultIcon = new IconConfig({ icon: "pin", color: "#ff9939" })
|
||||
|
|
@ -98,6 +96,9 @@ export default class PointRenderingConfig extends WithContextLoader {
|
|||
this.labelCss = this.tr("labelCss", undefined)
|
||||
this.labelCssClasses = this.tr("labelCssClasses", undefined)
|
||||
this.iconBadges = (json.iconBadges ?? []).map((overlay, i) => {
|
||||
if(typeof overlay === "string"){
|
||||
throw "Found an invalid,unexpanded overlay"
|
||||
}
|
||||
return {
|
||||
if: TagUtils.Tag(overlay.if),
|
||||
then: new TagRenderingConfig(overlay.then, `iconBadges.${i}`),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue