Fix: add support for legacy iconSize to fix some custom themes, see #1494

This commit is contained in:
Pieter Vander Vennet 2023-07-08 01:09:46 +02:00
parent a03ba313df
commit 200361bf8d

View file

@ -145,7 +145,13 @@ export class UpdateLegacyLayer extends DesugaringStep<
continue continue
} }
const pr = <PointRenderingConfigJson>rendering const pr = <PointRenderingConfigJson>rendering
const iconSize = pr.iconSize let iconSize = pr.iconSize
console.log("Iconsize is", iconSize)
if (Object.keys(pr.iconSize).length === 1 && pr.iconSize["render"] !== undefined) {
iconSize = pr.iconSize["render"]
}
if (typeof iconSize === "string") if (typeof iconSize === "string")
if (["bottom", "center", "top"].some((a) => (<string>iconSize).endsWith(a))) { if (["bottom", "center", "top"].some((a) => (<string>iconSize).endsWith(a))) {
const parts = iconSize.split(",").map((parts) => parts.toLowerCase().trim()) const parts = iconSize.split(",").map((parts) => parts.toLowerCase().trim())