mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-02-01 00:18:14 +01:00
fix: better variable naming
This commit is contained in:
parent
e837e5f780
commit
3c347bef7d
@ -145,8 +145,8 @@ export default {
|
|||||||
|
|
||||||
const baseTime = this.useChapterTrack ? this.currentChapterStart : 0;
|
const baseTime = this.useChapterTrack ? this.currentChapterStart : 0;
|
||||||
const duration = this.useChapterTrack ? this.currentChapterDuration : this.duration;
|
const duration = this.useChapterTrack ? this.currentChapterDuration : this.duration;
|
||||||
const chapterTime = (offsetX / this.trackWidth) * duration;
|
const progressTime = (offsetX / this.trackWidth) * duration;
|
||||||
const totalTime = baseTime + chapterTime;
|
const totalTime = baseTime + progressTime;
|
||||||
|
|
||||||
if (this.$refs.hoverTimestamp) {
|
if (this.$refs.hoverTimestamp) {
|
||||||
var width = this.$refs.hoverTimestamp.clientWidth
|
var width = this.$refs.hoverTimestamp.clientWidth
|
||||||
@ -167,7 +167,7 @@ export default {
|
|||||||
this.$refs.hoverTimestampArrow.style.left = posLeft + 'px'
|
this.$refs.hoverTimestampArrow.style.left = posLeft + 'px'
|
||||||
}
|
}
|
||||||
if (this.$refs.hoverTimestampText) {
|
if (this.$refs.hoverTimestampText) {
|
||||||
var hoverText = this.$secondsToTimestamp(chapterTime)
|
var hoverText = this.$secondsToTimestamp(progressTime)
|
||||||
|
|
||||||
var chapter = this.chapters.find((chapter) => chapter.start <= totalTime && totalTime < chapter.end)
|
var chapter = this.chapters.find((chapter) => chapter.start <= totalTime && totalTime < chapter.end)
|
||||||
if (chapter && chapter.title) {
|
if (chapter && chapter.title) {
|
||||||
|
Loading…
Reference in New Issue
Block a user