From 895ab8d18ad8462f5d64346f7ad4ec6cc346134f Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 11 Feb 2023 15:29:39 -0600 Subject: [PATCH] Fix:Audio track hover timestamp bubble z-index --- client/components/player/PlayerTrackBar.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/components/player/PlayerTrackBar.vue b/client/components/player/PlayerTrackBar.vue index 7b4f7c87..eeebb7af 100644 --- a/client/components/player/PlayerTrackBar.vue +++ b/client/components/player/PlayerTrackBar.vue @@ -15,7 +15,7 @@ -
+

00:00

@@ -83,9 +83,9 @@ export default { var offsetX = e.offsetX var perc = offsetX / this.trackWidth - const baseTime = this.useChapterTrack ? this.currentChapterStart : 0; - const duration = this.useChapterTrack ? this.currentChapterDuration : this.duration; - const time = baseTime + (perc * duration); + const baseTime = this.useChapterTrack ? this.currentChapterStart : 0 + const duration = this.useChapterTrack ? this.currentChapterDuration : this.duration + const time = baseTime + perc * duration if (isNaN(time) || time === null) { console.error('Invalid time', perc, time) return @@ -143,10 +143,10 @@ export default { mousemoveTrack(e) { var offsetX = e.offsetX - const baseTime = this.useChapterTrack ? this.currentChapterStart : 0; - const duration = this.useChapterTrack ? this.currentChapterDuration : this.duration; - const progressTime = (offsetX / this.trackWidth) * duration; - const totalTime = baseTime + progressTime; + const baseTime = this.useChapterTrack ? this.currentChapterStart : 0 + const duration = this.useChapterTrack ? this.currentChapterDuration : this.duration + const progressTime = (offsetX / this.trackWidth) * duration + const totalTime = baseTime + progressTime if (this.$refs.hoverTimestamp) { var width = this.$refs.hoverTimestamp.clientWidth