aboutsummaryrefslogtreecommitdiff
path: root/src/components/gallery/gallery.vue
diff options
context:
space:
mode:
authorEdijs <iamedijs@hotmail.com>2019-02-14 09:52:23 -0700
committerEdijs <iamedijs@hotmail.com>2019-02-14 09:52:23 -0700
commit50f0d216861bfce22c98caec7dd00bf8d9dc4a70 (patch)
treec55e184b18dc119034c43861a5f27cd525fc1328 /src/components/gallery/gallery.vue
parent295becd6c8cf8d6f628be74a14d8f28361c1923a (diff)
Use static height if gallery has single image
Diffstat (limited to 'src/components/gallery/gallery.vue')
-rw-r--r--src/components/gallery/gallery.vue7
1 files changed, 6 insertions, 1 deletions
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 @@
<template>
<div ref="galleryContainer" style="width: 100%;">
- <div class="gallery-row" v-for="row in rows" :style="rowHeight(row.length)" :class="{ 'contain-fit': useContainFit, 'cover-fit': !useContainFit }">
+ <div
+ v-for="(row, row_num) in rows"
+ :key="row_num"
+ :style="rowHeight(row.length)"
+ :class="{ 'gallery-row': true, 'contain-fit': useContainFit, 'cover-fit': !useContainFit }"
+ >
<attachment
v-for="attachment in row"
:setMedia="setMedia"