Commit 277997aa authored by anton's avatar anton

Fix current annotation highlighting in CellAnnotationList.vue

parent 1edb37a9
Pipeline #60440 passed with stage
in 23 seconds
......@@ -139,8 +139,7 @@ export default {
if (!this.annotations || !this.annotations.length) return
let idx = -1, annotation = this.annotations[0]
while (annotation && idx < this.annotations.length &&
this.baseSelector > DateTime.fromMillis(annotation.target.selector._valueMillis)) {
while (annotation && idx < this.annotations.length && this.baseMillis >= annotation.target.selector._valueMillis) {
idx++
annotation = this.annotations[idx + 1]
}
......@@ -149,6 +148,10 @@ export default {
baseSelector () {
if (!this.videoTime) return DateTime.local().toISO()
return this.videoTime.plus(this.playerTime * 1000)
},
baseMillis () {
if (!this.video) return DateTime.local().toMillis()
return this.video.target.selector._valueMillis + this.playerTime * 1000
}
},
methods: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment