From 9658da6a8dca167f873ccbf16313422b3d3fe543 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Tue, 25 Sep 2018 10:43:20 +0200 Subject: [PATCH] Added max-width and max-height to v-img to properly size full-screen photos --- frontend/src/app/pages/photos.vue | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/pages/photos.vue b/frontend/src/app/pages/photos.vue index c9a7e2f63..5a6a47da1 100644 --- a/frontend/src/app/pages/photos.vue +++ b/frontend/src/app/pages/photos.vue @@ -319,6 +319,8 @@ @click="closePhoto()" width="100%" height="100%" + :max-width="window.width" + :max-height="window.height" :srcset="viewDialogPhoto.getThumbnailSrcset()" :sizes="viewDialogPhoto.getThumbnailSizes()" > @@ -435,12 +437,20 @@ prevPhoto() { if(this.viewDialogPhotoIndex < 1 || !this.results[this.viewDialogPhotoIndex - 1]) return false; this.viewDialogPhotoIndex--; - this.viewDialogPhoto = this.results[this.viewDialogPhotoIndex]; + this.viewDialogPhoto = null; + + this.$nextTick(function () { + this.viewDialogPhoto = this.results[this.viewDialogPhotoIndex]; + }) }, nextPhoto() { if(this.viewDialogPhotoIndex >= this.results.length || !this.results[this.viewDialogPhotoIndex + 1]) return false; this.viewDialogPhotoIndex++; - this.viewDialogPhoto = this.results[this.viewDialogPhotoIndex]; + this.viewDialogPhoto = null; + + this.$nextTick(function () { + this.viewDialogPhoto = this.results[this.viewDialogPhotoIndex]; + }) }, clearSelection() { for (let i = 0; i < this.selected.length; i++) {