forked from Snck3rs/contao-leaflet-maps
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];
|
||||
|
||||
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 {
|
||||
$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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user