mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-31 23:20:05 +02:00
Use object-cover for author images unless AR is really high or low.
This commit is contained in:
parent
f38b6636e3
commit
7653e72e88
1 changed files with 1 additions and 2 deletions
|
@ -72,8 +72,7 @@ export default {
|
||||||
if (this.$refs.img) {
|
if (this.$refs.img) {
|
||||||
var { naturalWidth, naturalHeight } = this.$refs.img
|
var { naturalWidth, naturalHeight } = this.$refs.img
|
||||||
var imgAr = naturalHeight / naturalWidth
|
var imgAr = naturalHeight / naturalWidth
|
||||||
var arDiff = Math.abs(imgAr - aspectRatio)
|
if (imgAr < 0.5 || imgAr > 2) {
|
||||||
if (arDiff > 0.15) {
|
|
||||||
this.showCoverBg = true
|
this.showCoverBg = true
|
||||||
} else {
|
} else {
|
||||||
this.showCoverBg = false
|
this.showCoverBg = false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue