Amelioration de la legende

This commit is contained in:
EpicKiwi 2026-06-10 01:23:28 +02:00
parent 9e22e38b8f
commit 0cbe9a80ec
Signed by: epickiwi
GPG key ID: C4B28FD2729941CE
2 changed files with 7 additions and 1 deletions

View file

@ -17,6 +17,8 @@ TEMPLATE.innerHTML = `
justify-content: center;
align-items: center;
background-color: color-mix(in srgb, var(--background-color, transparent), transparent 50%);
box-sizing: border-box;
border: solid 1px transparent;
}
@ -56,7 +58,7 @@ export class FeatureLegendElement extends HTMLElement {
container.hidden = !this.feature
if(this.feature){
let symbol = this.feature.mapSymbol
container.style.backgroundColor = symbol.backgroundColor || "transparent"
container.style.setProperty("--background-color", symbol.backgroundColor || "transparent");
container.style.backgroundImage = symbol.backgroundUrl ? `url(${symbol.backgroundUrl})` : "none"
container.style.borderColor = symbol.borderColor || "transparent"
if(symbol.markerUrl){