@maplat/ui 0.11.6 → 0.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maplat/ui",
3
- "version": "0.11.6",
3
+ "version": "0.11.7",
4
4
  "description": "Maplat is the cool Historical Map/Illustrated Map Viewer.\nIt can transform each map coordinates with nonlinear but homeomorphic projection and makes possible that the maps can collaborate with GPS/accurate maps, without distorting original maps.",
5
5
  "type": "module",
6
6
  "main": "dist/maplat-ui.umd.js",
package/src/ui_init.ts CHANGED
@@ -974,8 +974,12 @@ function initModalHandlers(ui: MaplatUi, appOption: MaplatAppOption) {
974
974
  const fileName = (val as string)
975
975
  .toLowerCase()
976
976
  .replace(/ /g, "_");
977
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
978
+ const iconUrl =
979
+ (pointer as any)[`${fileName}.png`] ||
980
+ `assets/parts/${fileName}.png`;
977
981
  (contentEl as HTMLElement).innerHTML =
978
- `<img src="assets/parts/${fileName}.png" class="license" />`;
982
+ `<img src="${iconUrl}" class="license" />`;
979
983
  } else {
980
984
  (contentEl as HTMLElement).innerHTML =
981
985
  ui.core!.translate(val) || "";