Use static height if gallery has single image
This commit is contained in:
parent
295becd6c8
commit
50f0d21686
2 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue