forked from MapComplete/MapComplete
Add icon size options to mapping icons
This commit is contained in:
parent
29ad3be280
commit
2e6069b95b
10 changed files with 159 additions and 44 deletions
|
@ -32,7 +32,7 @@ export class ExtractImages extends Conversion<LayoutConfigJson, string[]> {
|
|||
for (const foundImage of found) {
|
||||
if (typeof foundImage === "string") {
|
||||
allFoundImages.push(foundImage)
|
||||
} else {
|
||||
} else{
|
||||
// This is a tagRendering where every rendered value might be an icon!
|
||||
for (const trpath of trpaths) {
|
||||
if (trpath.typeHint !== "rendered") {
|
||||
|
@ -54,7 +54,9 @@ export class ExtractImages extends Conversion<LayoutConfigJson, string[]> {
|
|||
}
|
||||
}
|
||||
|
||||
const splitParts = [].concat(...Utils.NoNull(allFoundImages).map(img => img.split(";")))
|
||||
const splitParts = [].concat(...Utils.NoNull(allFoundImages)
|
||||
.map(img => img["path"] ?? img)
|
||||
.map(img => img.split(";")))
|
||||
.map(img => img.split(":")[0])
|
||||
return {result: Utils.Dedup(splitParts), errors, warnings};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue