Remove lightbox legacy html tags
Deploy Livetrail / deploy (push) Successful in 17s

This commit is contained in:
2026-09-09 17:46:38 +02:00
parent dc4480c4e2
commit a70f6fe64c
4 changed files with 51 additions and 85 deletions
+11 -2
View File
@@ -69,6 +69,9 @@ export default {
isMarkerVisible: (oLngLat) => this.$refs.mapCtrl.isMarkerVisible(oLngLat),
findMarkerByMediaId: (iMediaId) => this.$refs.mapCtrl.findMarkerByMediaId(iMediaId)
},
lightbox: {
open: (iMediaId, sSource) => this.openLightbox(iMediaId, sSource)
},
project: this
};
},
@@ -119,13 +122,19 @@ export default {
const pMapReady = this.initProjectMap();
await this.feed.init(pMapReady);
},
openLightbox(iMediaId, sSource) {
const aoAlbum = (sSource == 'marker')
? (this.$refs.mapCtrl.findMarkerByMediaId(iMediaId)?.medias || [])
: this.feed.posts.filter((oPost) => oPost.type == 'media');
this.$refs.lightbox.open(aoAlbum, iMediaId, sSource);
},
async onLightboxMediaChange(oMedia) {
this.hash.items = [this.project.codename, 'media', oMedia.id];
if(oMedia.set == 'post-medias') {
if(oMedia.source == 'post') {
(await this.feed.findPost('media', oMedia.id))?.panMapToMarker();
if(!this.$refs.lightbox.hasMediaAfterCurrent()) {
await this.feed.getNextFeed();
this.$refs.lightbox.refreshAlbum();
this.$refs.lightbox.refreshAlbum(this.feed.posts.filter((oPost) => oPost.type == 'media'));
}
}
},