diff --git a/Logic/ImageProviders/WikimediaImageProvider.ts b/Logic/ImageProviders/WikimediaImageProvider.ts index 5d6dbbdbd..0b75982fd 100644 --- a/Logic/ImageProviders/WikimediaImageProvider.ts +++ b/Logic/ImageProviders/WikimediaImageProvider.ts @@ -73,7 +73,7 @@ export class WikimediaImageProvider extends ImageProvider { } return new Link( - Svg.wikimedia_commons_white_img, + Svg.wikimedia_commons_white_svg(), `https://commons.wikimedia.org/wiki/${backlink}`, true ) diff --git a/Models/ThemeConfig/PointRenderingConfig.ts b/Models/ThemeConfig/PointRenderingConfig.ts index b6b24ab65..d32926be2 100644 --- a/Models/ThemeConfig/PointRenderingConfig.ts +++ b/Models/ThemeConfig/PointRenderingConfig.ts @@ -87,7 +87,7 @@ export default class PointRenderingConfig extends WithContextLoader { const iconPath = this.icon?.GetRenderValue({ id: "node/-1" })?.txt if (iconPath !== undefined && iconPath.startsWith(Utils.assets_path)) { const iconKey = iconPath.substr(Utils.assets_path.length) - if (Constants.defaultPinIcons.indexOf(iconKey) < 0) { + if (Svg.All[iconKey] === undefined) { throw context + ": builtin SVG asset not found: " + iconPath } } diff --git a/scripts/generateIncludedImages.ts b/scripts/generateIncludedImages.ts index 69e01a98f..0920945f8 100644 --- a/scripts/generateIncludedImages.ts +++ b/scripts/generateIncludedImages.ts @@ -39,10 +39,8 @@ function genImages(dryrun = false) { let rawName = name module += ` public static ${name} = "${svg}"\n` - module += ` public static ${name}_img = Img.AsImageElement(Svg.${rawName})\n` module += ` public static ${name}_svg() { return new Img(Svg.${rawName}, true);}\n` - // module += ` /**@deprecated*/ public static ${name}_ui() { return new FixedUiElement(Svg.${rawName}_img);}\n\n` - if (Constants.defaultPinIcons.indexOf(name) >= 0 && !dryrun) { + if (!dryrun) { allNames.push(`"${path}": Svg.${name}`) } } @@ -52,4 +50,4 @@ function genImages(dryrun = false) { console.log("Done") } -genImages(false) +genImages()