mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-27 09:37:24 +01:00
fix: use global isExternalIcon to allow local custom icons in regiments & prevent unscaled svg crashing v1.109 loads
This commit is contained in:
parent
743d45c318
commit
6d000f7b06
3 changed files with 13 additions and 9 deletions
|
|
@ -42,7 +42,7 @@ function drawMarker(marker, rescale = 1) {
|
|||
const viewX = rn(x - zoomSize / 2, 1);
|
||||
const viewY = rn(y - zoomSize, 1);
|
||||
|
||||
const isExternal = icon.startsWith("http") || icon.startsWith("data:image") || icon.includes(".svg") || icon.includes("/");
|
||||
const isExternal = typeof icon === "string" && (icon.startsWith("http") || icon.startsWith("data:image") || icon.includes(".svg") || icon.includes("/"));
|
||||
|
||||
return /* html */ `
|
||||
<svg id="${id}" viewbox="0 0 30 30" width="${zoomSize}" height="${zoomSize}" x="${viewX}" y="${viewY}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue