diff options
| author | Edijs <iamedijs@hotmail.com> | 2019-02-14 09:52:23 -0700 |
|---|---|---|
| committer | Edijs <iamedijs@hotmail.com> | 2019-02-14 09:52:23 -0700 |
| commit | 50f0d216861bfce22c98caec7dd00bf8d9dc4a70 (patch) | |
| tree | c55e184b18dc119034c43861a5f27cd525fc1328 /src/components/gallery/gallery.js | |
| parent | 295becd6c8cf8d6f628be74a14d8f28361c1923a (diff) | |
Use static height if gallery has single image
Diffstat (limited to 'src/components/gallery/gallery.js')
| -rw-r--r-- | src/components/gallery/gallery.js | 4 |
1 files changed, 3 insertions, 1 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 |
