From ccd206e95ddb7b39a808ae33875fe7bd51ce34ed Mon Sep 17 00:00:00 2001 From: advplyr Date: Tue, 24 Jan 2023 17:52:28 -0600 Subject: [PATCH] Fix cover height overflow on fullscreen audio player --- components/app/AudioPlayer.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/components/app/AudioPlayer.vue b/components/app/AudioPlayer.vue index baf6e254..94e28f44 100644 --- a/components/app/AudioPlayer.vue +++ b/components/app/AudioPlayer.vue @@ -230,7 +230,14 @@ export default { // Portrait let sideSpace = 20 if (this.bookCoverAspectRatio === 1.6) sideSpace += (this.windowWidth - sideSpace) * 0.375 - return this.windowWidth - sideSpace + + const availableHeight = this.windowHeight - 400 + let width = this.windowWidth - sideSpace + const totalHeight = width * this.bookCoverAspectRatio + if (totalHeight > availableHeight) { + width = availableHeight / this.bookCoverAspectRatio + } + return width } else { // Landscape const heightScale = (this.windowHeight - 200) / 651