check visibility, add quater css
This commit is contained in:
parent
f9b30f1fd8
commit
c32d2ec57a
2 changed files with 9 additions and 4 deletions
|
@ -53,9 +53,13 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
.left {
|
.left {
|
||||||
float: left;
|
float: left;
|
||||||
padding-right: 1vw;
|
padding-right: 1vw;
|
||||||
width: 30%;
|
width: 50%;
|
||||||
|
&.quater {
|
||||||
|
width: 320px;
|
||||||
|
height: 240px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.clearpara {
|
.clearpara {
|
||||||
clear: left;
|
clear: left;
|
||||||
|
|
|
@ -173,8 +173,9 @@ function renderAnnotation(config, video, root, clip) {
|
||||||
updatePlayer(video, frame, annotation['in'], annotation['out'], src, config)
|
updatePlayer(video, frame, annotation['in'], annotation['out'], src, config)
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
console.log('add resize')
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
var visible = isElementInViewport(frame);
|
var visible = video._frame == frame;
|
||||||
if (config.loaded && visible) {
|
if (config.loaded && visible) {
|
||||||
updatePlayerRect(video, frame, config)
|
updatePlayerRect(video, frame, config)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue