diff --git a/module/geogallery/geogallery.php b/module/geogallery/geogallery.php index 6cb5f444..ae55d038 100644 --- a/module/geogallery/geogallery.php +++ b/module/geogallery/geogallery.php @@ -390,7 +390,9 @@ class geogallery extends common $directory = $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'config', 'directory']); if (is_dir($directory)) { $iterator = new DirectoryIterator($directory); + foreach ($iterator as $fileInfos) { + if ($fileInfos->isDot() === false and $fileInfos->isFile() and @getimagesize($fileInfos->getPathname())) { // Créer la miniature si manquante @@ -409,6 +411,7 @@ class geogallery extends common self::$galleries[] = [ 'lat' => $this->gps_decimal($exif['GPSLatitude'], $exif['GPSLatitudeRef']), 'long' => $this->gps_decimal($exif['GPSLongitude'], $exif['GPSLatitudeRef']), + 'img'=> $fileInfos->getPath() . '/' . strtolower($fileInfos->getFilename()), 'thumb' => str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), 'label' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'legend', str_replace('.', '', $fileInfos->getFilename())]) ]; @@ -416,6 +419,7 @@ class geogallery extends common self::$galleries[] = [ 'lat' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'positions', 'directory', str_replace('.', '', $fileInfos->getFilename())]), 'long' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'positions', 'directory', str_replace('.', '', $fileInfos->getFilename())]), + 'img'=> $fileInfos->getPath() . '/' . strtolower($fileInfos->getFilename()), 'thumb' => str_replace('source', 'thumb', $fileInfos->getPath()) . '/' . self::THUMBS_SEPARATOR . strtolower($fileInfos->getFilename()), 'label' => $this->getData(['module', $this->getUrl(0), 'content', $gallery, 'legend', str_replace('.', '', $fileInfos->getFilename())]) ]; diff --git a/module/geogallery/view/index/index.css b/module/geogallery/view/index/index.css index 0af8e528..9506f6b7 100644 --- a/module/geogallery/view/index/index.css +++ b/module/geogallery/view/index/index.css @@ -12,4 +12,23 @@ * @link http://zwiicms.fr/ */ -#map { height: 400px; } \ No newline at end of file +#map { + height: 400px; +} + +.lity-wrap { + width: auto !important; + height: auto !important; + max-width: 90%; + max-height: 90%; + display: flex; + align-items: center; + justify-content: center; +} + +.lity-content img { + width: auto; + max-width: 100%; + height: auto; + max-height: 100%; +} \ No newline at end of file diff --git a/module/geogallery/view/index/index.js.php b/module/geogallery/view/index/index.js.php index d249f119..e6be52b7 100644 --- a/module/geogallery/view/index/index.js.php +++ b/module/geogallery/view/index/index.js.php @@ -35,5 +35,5 @@ const objOptions = JSON.parse(jsonOptions); obj.forEach(function(location) { var marker = L.marker([location.lat, location.long], {title: location.label}); marker.addTo(map); - marker.bindPopup('Thumbnail'); + marker.bindPopup('Thumbnail'); }); \ No newline at end of file