add single mode color
This commit is contained in:
parent
33be739566
commit
5f38662413
1 changed files with 5 additions and 0 deletions
|
@ -409,6 +409,11 @@ function renderSingleMode(config) {
|
||||||
config.root.appendChild(div)
|
config.root.appendChild(div)
|
||||||
var frame = div.querySelector('.frame')
|
var frame = div.querySelector('.frame')
|
||||||
var text = div.querySelector('.text')
|
var text = div.querySelector('.text')
|
||||||
|
var first = config.annotations[0]
|
||||||
|
if (text && first) {
|
||||||
|
var color1 = `hsl(${first.color1.hue}, 60%, 15%)`
|
||||||
|
div.style.background = `${color1}`;
|
||||||
|
}
|
||||||
document.addEventListener('scroll', onVisibilityChange(div.querySelector('.frame'), function(visible) {
|
document.addEventListener('scroll', onVisibilityChange(div.querySelector('.frame'), function(visible) {
|
||||||
if (config.loaded && visible) {
|
if (config.loaded && visible) {
|
||||||
updatePlayer(config.video, frame, config['in'], config['out'], src, config)
|
updatePlayer(config.video, frame, config['in'], config['out'], src, config)
|
||||||
|
|
Loading…
Reference in a new issue