mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-01 04:24:02 +01:00
Support inactive layers icons.
This commit is contained in:
BIN
module/assets/img/group_1.png
Normal file
BIN
module/assets/img/group_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 666 B |
BIN
module/assets/img/markers_1.png
Normal file
BIN
module/assets/img/markers_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 575 B |
BIN
module/assets/img/tile_1.png
Normal file
BIN
module/assets/img/tile_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 588 B |
BIN
module/assets/img/vectors_1.png
Normal file
BIN
module/assets/img/vectors_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 580 B |
@@ -49,11 +49,18 @@ class Layer
|
|||||||
: $GLOBALS['TL_LANG']['leaflet_layer'][$row['type']][1];
|
: $GLOBALS['TL_LANG']['leaflet_layer'][$row['type']][1];
|
||||||
|
|
||||||
if (!empty($this->layers[$row['type']]['icon'])) {
|
if (!empty($this->layers[$row['type']]['icon'])) {
|
||||||
$icon = \Image::getHtml($this->layers[$row['type']]['icon'], $alt, sprintf('title="%s"', $title));
|
$src = $this->layers[$row['type']]['icon'];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$icon = \Image::getHtml('iconPLAIN.gif', $alt, sprintf('title="%s"', $title));
|
$src = 'iconPLAIN.gif';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$row['active']) {
|
||||||
|
$src = preg_replace('/(\.[^\.]+)$/', '_1$1', $src);
|
||||||
|
}
|
||||||
|
|
||||||
|
$icon = \Image::getHtml($src, $alt, sprintf('title="%s"', $title));
|
||||||
|
|
||||||
return $icon . ' ' . $label;
|
return $icon . ' ' . $label;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user