Merge pull request #1620 from TriliumNext/fix_leaflet-marker

fix(geo_map): fix leaflet asset copying/loading
This commit is contained in:
JYC333 2025-04-03 23:05:34 +02:00 committed by GitHub
commit 614d395d72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -260,8 +260,8 @@ export default class GeoMapTypeWidget extends TypeWidget {
#buildIcon(bxIconClass: string, colorClass: string, title: string) { #buildIcon(bxIconClass: string, colorClass: string, title: string) {
return this.L.divIcon({ return this.L.divIcon({
html: `\ html: `\
<img class="icon" src="${asset_path}/node_modules/leaflet/dist/images/marker-icon.png" /> <img class="icon" src="${asset_path}/app-dist/leaflet/images/marker-icon.png" />
<img class="icon-shadow" src="${asset_path}/node_modules/leaflet/dist/images/marker-shadow.png" /> <img class="icon-shadow" src="${asset_path}/app-dist/leaflet/images/marker-shadow.png" />
<span class="bx ${bxIconClass} ${colorClass}"></span> <span class="bx ${bxIconClass} ${colorClass}"></span>
<span class="title-label">${title}</span>`, <span class="title-label">${title}</span>`,
iconSize: [25, 41], iconSize: [25, 41],

View File

@ -34,6 +34,11 @@ const config: Configuration = {
context: "node_modules/@excalidraw/excalidraw/dist/prod/fonts/", context: "node_modules/@excalidraw/excalidraw/dist/prod/fonts/",
from: "**/*", from: "**/*",
to: "excalidraw/fonts/" to: "excalidraw/fonts/"
},
{
context: "node_modules/leaflet/dist/images/",
from: "**/*",
to: "leaflet/images/"
} }
] ]
}) })