update height on display
This commit is contained in:
parent
f39f854821
commit
0746a2ab6c
2 changed files with 17 additions and 0 deletions
|
|
@ -29,6 +29,18 @@ class PandoraScroll extends HTMLElement {
|
|||
video.muted = true
|
||||
})
|
||||
}
|
||||
this.updateAnnotationHeight = function() {
|
||||
var height = 0
|
||||
var text = shadow.querySelector('.text')
|
||||
text.querySelectorAll('.annotation.single').forEach(annotation => {
|
||||
var rect = annotation.getBoundingClientRect()
|
||||
console.log(annotation, rect.height)
|
||||
if (rect.height > height) {
|
||||
height = rect.height
|
||||
}
|
||||
})
|
||||
text.style.height = height + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue