diff --git a/app/static/css/partials/_ascroll.scss b/app/static/css/partials/_ascroll.scss index ea40843..17decbf 100755 --- a/app/static/css/partials/_ascroll.scss +++ b/app/static/css/partials/_ascroll.scss @@ -53,9 +53,13 @@ } .left { - float: left; - padding-right: 1vw; - width: 30%; + float: left; + padding-right: 1vw; + width: 50%; + &.quater { + width: 320px; + height: 240px; + } } .clearpara { clear: left; diff --git a/app/static/js/ascroll.js b/app/static/js/ascroll.js index 1f83c88..fef055b 100644 --- a/app/static/js/ascroll.js +++ b/app/static/js/ascroll.js @@ -173,8 +173,9 @@ function renderAnnotation(config, video, root, clip) { updatePlayer(video, frame, annotation['in'], annotation['out'], src, config) } })) + console.log('add resize') window.addEventListener('resize', () => { - var visible = isElementInViewport(frame); + var visible = video._frame == frame; if (config.loaded && visible) { updatePlayerRect(video, frame, config) }