mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
improving map: only loading map icon if visible
This commit is contained in:
parent
c5a1fa2657
commit
73d820d900
@ -254,6 +254,7 @@ export class GalleryMapLightboxComponent implements OnChanges {
|
||||
|
||||
// Setting photo icon
|
||||
if (Config.Client.Map.useImageMarkers === true) {
|
||||
mkr.on('add', () => {
|
||||
const iconTh = this.thumbnailService.getIcon(new MediaIcon(p));
|
||||
this.thumbnailsOnLoad.push(iconTh);
|
||||
iconTh.Visible = true;
|
||||
@ -264,12 +265,13 @@ export class GalleryMapLightboxComponent implements OnChanges {
|
||||
}));
|
||||
mkr.options.alt = p.name;
|
||||
};
|
||||
|
||||
if (iconTh.Available === true) {
|
||||
setIcon();
|
||||
} else {
|
||||
iconTh.OnLoad = setIcon;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
if (this.gpxFiles) {
|
||||
|
Loading…
Reference in New Issue
Block a user