Refresh lightbox album when getting new feed
This commit is contained in:
@@ -129,9 +129,16 @@ export default {
|
||||
positionFromTop: 0,
|
||||
resizeDuration: 400,
|
||||
hasVideo: true,
|
||||
onMediaChange: (oMedia) => {
|
||||
onMediaChange: async (oMedia) => {
|
||||
this.hash.items = [this.currProject.codename, 'media', oMedia.id];
|
||||
if(oMedia.set == 'post-medias') this.goToPost('media', oMedia.id)?.panMapToMarker();
|
||||
if(oMedia.set == 'post-medias') {
|
||||
this.goToPost('media', oMedia.id)?.panMapToMarker();
|
||||
if(!this.lightbox.hasMediaAfterCurrent()) {
|
||||
await this.getNextFeed();
|
||||
await this.$nextTick();
|
||||
this.lightbox.refreshAlbum();
|
||||
}
|
||||
}
|
||||
},
|
||||
onClosing: () => {this.hash.items = [this.hash.items[0]];}
|
||||
});
|
||||
@@ -464,6 +471,10 @@ export default {
|
||||
const iXOffset = (this.settingsPanelOpen?getOuterWidth(this.$refs.settings):0) - (this.feedPanelOpen?getOuterWidth(this.$refs.feed):0);
|
||||
|
||||
return new Promise((resolve) => {
|
||||
if(!this.map) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
this.map.once('moveend', resolve);
|
||||
this.map.easeTo({
|
||||
center: oLngLat,
|
||||
@@ -474,7 +485,7 @@ export default {
|
||||
});
|
||||
},
|
||||
isMarkerVisible(oLngLat){
|
||||
return this.map.getBounds().contains(oLngLat);
|
||||
return !!this.map && this.map.getBounds().contains(oLngLat);
|
||||
},
|
||||
getGoogleMapsLink(asInfo) {
|
||||
return $('<a>', {
|
||||
|
||||
Reference in New Issue
Block a user