]> git.sesse.net Git - ultimatescore/commitdiff
Remove some workarounds for old CEF (in particular, we have flexbox now).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 17 Mar 2018 00:02:12 +0000 (01:02 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 17 Mar 2018 00:02:12 +0000 (01:02 +0100)
score.css
score.js

index ba0981afba6e098e51b3e7299d951fbff638669b..f61df5058803f52dbd7e65a81ad7c623f64f8d10 100644 (file)
--- a/score.css
+++ b/score.css
@@ -131,6 +131,8 @@ body {
   background-image: url(lowerthird-bg.png);
   color: black;
   /* padding-top: 20px; */
+  display: flex;
+  align-items: center;
 }
 .lowerthird-headline-hidden {
   width: 0px;
@@ -156,6 +158,7 @@ body {
 .lowerthird-headline-content-animate-out {
   -webkit-animation: wipe-in 2.0s ease;
   clip: rect(0px,0px,200px,0px);
+  -webkit-animation-fill-mode: both;
 }
 .lowerthird-subheading {
   position: fixed;
@@ -171,6 +174,8 @@ body {
   align-items: center; */
   /*background: linear-gradient(to right, #44c, #33a 15px); */
   background-image: url(lowerthird-bg2.png);
+  display: flex;
+  align-items: center;
 }
 .lowerthird-subheading-hidden {
   clip: rect(0px,0px,200px,0px);
index 85ab488b39d9a17f05ee9a81bcb86c787f85c3f7..1d28e4cf2308015377b98626ea629003bb7e3b4c 100644 (file)
--- a/score.js
+++ b/score.js
@@ -110,19 +110,6 @@ function showlowerthird()
 {
        if (lowerthird_visible) return;
 
-       // With no flexbox, this is how it has to be...
-       let f = document.getElementById('lowerthird-headline');
-       let g = document.getElementById('lowerthird-headline-content');
-       f.style.paddingTop = Math.round((f.clientHeight - g.clientHeight) / 2) + 'px';
-
-       f = document.getElementById('lowerthird-subheading');
-       g = document.getElementById('lowerthird-subheading-content');
-       f.style.paddingTop = Math.round((f.clientHeight - g.clientHeight) / 2) + 'px';
-
-       f = document.getElementById('lowerthird-picture');
-       g = document.getElementById('lowerthird-picture-content');
-       f.style.paddingTop = Math.round((f.clientHeight - g.clientHeight) / 2) + 'px';
-
        document.getElementById('lowerthird-headline').className = 'lowerthird-headline lowerthird-headline-animate-in';
        document.getElementById('lowerthird-headline-content').className = 'lowerthird-headline-content lowerthird-headline-content-animate-in';
        document.getElementById('lowerthird-subheading').className = 'lowerthird-subheading lowerthird-subheading-animate-in';
@@ -153,7 +140,7 @@ function hidelowerthird()
        document.getElementById('lowerthird-headline-content').className = 'lowerthird-headline-content lowerthird-headline-content-animate-out';
        document.getElementById('lowerthird-subheading').className = 'lowerthird-subheading lowerthird-subheading-animate-out';
        document.getElementById('lowerthird-subheading-content').className = 'lowerthird-subheading-content lowerthird-subheading-content-animate-out';
-       document.getElementById('lowerthird-picture').className = 'lowerthird-picture lowerthird-picture-hidden lowerthird-picture-animate-out';
+       document.getElementById('lowerthird-picture').className = 'lowerthird-picture lowerthird-picture-animate-out';
        document.getElementById('lowerthird-picture-content').className = 'lowerthird-picture-content lowerthird-picture-content-animate-out';
        lowerthird_visible = false;
 }
@@ -220,9 +207,6 @@ function play()
 {
        document.getElementById('manualcontrols').style.display = 'none';
        document.getElementById('area').style.display = 'none';
-
-       // Old CEF workaround
-       document.getElementById('lowerthird-subheading').style.top = '638px';
 }
 
 function update(v)