diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index 116f0a4877..fd75206f95 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -80,8 +80,10 @@ "pointRendering": [ { "=marker": [ + {"icon": "circle", + "color": "white"}, { - "icon": "circle:white;./assets/themes/onwheels/entrance.svg" + "icon": "./assets/themes/onwheels/entrance.svg" } ] } @@ -258,6 +260,7 @@ { "builtin": "parking_spaces", "override": { + "id": "parking_spaces_disabled", "source": { "osmTags": "parking_space=disabled" }, @@ -410,9 +413,10 @@ "syncSelection": "theme-only", "pointRendering": [ { - "=marker": [ + "=marker": [ {"icon": "circle", + "color": "white"}, { - "icon": "circle:white;./assets/themes/onwheels/elevator.svg" + "icon": "./assets/themes/onwheels/elevator.svg" } ], "iconSize": "40,40", diff --git a/src/Models/ThemeConfig/PointRenderingConfig.ts b/src/Models/ThemeConfig/PointRenderingConfig.ts index a522c45a74..8821adec7a 100644 --- a/src/Models/ThemeConfig/PointRenderingConfig.ts +++ b/src/Models/ThemeConfig/PointRenderingConfig.ts @@ -79,7 +79,6 @@ export default class PointRenderingConfig extends WithContextLoader { } }) - this.marker = (json.marker ?? []).map((m) => new IconConfig(m)) if (json.css !== undefined) { this.cssDef = this.tr("css", undefined) @@ -199,13 +198,14 @@ export default class PointRenderingConfig extends WithContextLoader { if (options?.noSize) { iconAndBadges.SetClass("w-full h-full") + } else { + tags.map((tags) => this.iconSize.GetRenderValue(tags).Subs(tags).txt ?? "[40,40]").map( + (size) => { + const [iconW, iconH] = size.split(",").map((x) => num(x)) + iconAndBadges.SetStyle(`width: ${iconW}px; height: ${iconH}px`) + } + ) } - tags.map((tags) => this.iconSize.GetRenderValue(tags).Subs(tags).txt ?? "[40,40]").map( - (size) => { - const [iconW, iconH] = size.split(",").map((x) => num(x)) - iconAndBadges.SetStyle(`width: ${iconW}px; height: ${iconH}px`) - } - ) const css = this.cssDef?.GetRenderValue(tags.data)?.txt const cssClasses = this.cssClasses?.GetRenderValue(tags.data)?.txt diff --git a/src/UI/Popup/AddNewPoint/PresetList.svelte b/src/UI/Popup/AddNewPoint/PresetList.svelte index 0ff3224b2a..eb2d2e8c78 100644 --- a/src/UI/Popup/AddNewPoint/PresetList.svelte +++ b/src/UI/Popup/AddNewPoint/PresetList.svelte @@ -12,6 +12,7 @@ import NextButton from "../../Base/NextButton.svelte" import ToSvelte from "../../Base/ToSvelte.svelte" import BaseUIElement from "../../BaseUIElement" + import Combine from "../../Base/Combine" /** * This component lists all the presets and allows the user to select one @@ -54,9 +55,9 @@ for (const preset of layer.presets) { const tags = TagUtils.KVtoProperties(preset.tags ?? []) - const icon: BaseUIElement = layer.mapRendering[0] - .RenderIcon(new ImmutableStore(tags)) - .html.SetClass("w-12 h-12 block relative mr-4") + const markers = layer.mapRendering.map((mr, i) => mr.RenderIcon(new ImmutableStore(tags), {noSize: i == 0}) + .html.SetClass(i == 0 ? "w-full h-full" : "")) + const icon: BaseUIElement = new Combine(markers.map(m => new Combine([m]).SetClass("absolute top-0 left-0 w-full h-full flex justify-around items-center"))).SetClass("w-12 h-12 block relative mr-4") const description = preset.description?.FirstSentence()