viewer: add icon shadows

This commit is contained in:
Matthias Schiffer 2024-01-07 01:56:03 +01:00
parent 989428f78d
commit ac0fd06b16
Signed by: neocturne
GPG key ID: 16EF3F64CB201D9C
5 changed files with 5 additions and 3 deletions

View file

@ -40,12 +40,14 @@ const signIcons = {};
function signIcon(material, kind) { function signIcon(material, kind) {
function createSignIcon(material, kind) { function createSignIcon(material, kind) {
const params = signKinds[kind]; const {iconSize, popupAnchor} = signKinds[kind];
return L.icon({ return L.icon({
iconUrl: `images/icon/${material}_${kind}.png`, iconUrl: `images/icon/${material}_${kind}.png`,
iconSize: params.iconSize, iconSize,
popupAnchor: params.popupAnchor, popupAnchor,
shadowUrl: `images/icon/shadow_${kind}.png`,
shadowSize: [iconSize[0]+8, iconSize[1]+8],
className: 'overzoomed', className: 'overzoomed',
}); });
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B