Fix:Library list view cover size #474

This commit is contained in:
advplyr 2023-01-08 14:07:48 -06:00
parent 34b3910ff8
commit eb40f6e6e9
2 changed files with 33 additions and 9 deletions

View file

@ -526,9 +526,9 @@ export default {
this.imageReady = true
if (this.$refs.cover && this.bookCoverSrc !== this.placeholderUrl) {
var { naturalWidth, naturalHeight } = this.$refs.cover
var aspectRatio = naturalHeight / naturalWidth
var arDiff = Math.abs(aspectRatio - this.bookCoverAspectRatio)
const { naturalWidth, naturalHeight } = this.$refs.cover
const aspectRatio = naturalHeight / naturalWidth
const arDiff = Math.abs(aspectRatio - this.bookCoverAspectRatio)
// If image aspect ratio is <= 1.45 or >= 1.75 then use cover bg, otherwise stretch to fit
if (arDiff > 0.15) {