From 50f0d216861bfce22c98caec7dd00bf8d9dc4a70 Mon Sep 17 00:00:00 2001 From: Edijs Date: Thu, 14 Feb 2019 09:52:23 -0700 Subject: [PATCH 01/22] Use static height if gallery has single image --- src/components/gallery/gallery.js | 4 +++- src/components/gallery/gallery.vue | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/gallery/gallery.js b/src/components/gallery/gallery.js index 7f33a81b..c713ce07 100644 --- a/src/components/gallery/gallery.js +++ b/src/components/gallery/gallery.js @@ -34,7 +34,9 @@ const Gallery = { return rows }, rowHeight () { - return itemsPerRow => ({ 'height': `${(this.width / (itemsPerRow + 0.6))}px` }) + return itemsPerRow => ({ + 'height': this.attachments.length === 1 ? '260px' : `${(this.width / (itemsPerRow + 0.6))}px` + }) }, useContainFit () { return this.$store.state.config.useContainFit diff --git a/src/components/gallery/gallery.vue b/src/components/gallery/gallery.vue index 3f90caa9..90888c21 100644 --- a/src/components/gallery/gallery.vue +++ b/src/components/gallery/gallery.vue @@ -1,6 +1,11 @@