mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-02 00:54:30 +02:00
Fix:Library list view cover size #474
This commit is contained in:
parent
34b3910ff8
commit
eb40f6e6e9
2 changed files with 33 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue