mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Allow data URI scheme for custom images (#1196)
* Allow data URL external images * fix * removed inconsistency
This commit is contained in:
parent
f859439fc8
commit
8131f25456
12 changed files with 32 additions and 32 deletions
|
|
@ -872,7 +872,7 @@ function configMarkersGeneration() {
|
|||
</tr></thead>`;
|
||||
|
||||
const lines = config.map(({type, icon, multiplier}) => {
|
||||
const isExternal = icon.startsWith("http");
|
||||
const isExternal = icon.startsWith("http") || icon.startsWith("data:image");
|
||||
|
||||
return /* html */ `<tr>
|
||||
<td><input class="type" value="${type}" /></td>
|
||||
|
|
@ -898,7 +898,7 @@ function configMarkersGeneration() {
|
|||
const icon = image.getAttribute("src") || emoji.textContent;
|
||||
|
||||
selectIcon(icon, value => {
|
||||
const isExternal = value.startsWith("http");
|
||||
const isExternal = value.startsWith("http") || value.startsWith("data:image");
|
||||
image.setAttribute("src", isExternal ? value : "");
|
||||
image.hidden = !isExternal;
|
||||
emoji.textContent = isExternal ? "" : value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue