]> git.0d.be Git - jackwsmeter.git/commitdiff
style: add lines at scale marks
authorFrédéric Péters <fpeters@0d.be>
Wed, 2 Jul 2014 18:30:52 +0000 (20:30 +0200)
committerFrédéric Péters <fpeters@0d.be>
Wed, 2 Jul 2014 19:32:28 +0000 (21:32 +0200)
jackwsmeter.html

index d1419f9a32cb702cab97eaa83c99236ce7932ddb..b1165a15e052456e1f3b00e6fce0944f2ad9dd3b 100644 (file)
@@ -24,6 +24,8 @@ body {
 #scale span {
        position: absolute;
        color: white;
+       border-right: 1px solid white;
+       padding-right: 1ex;
 }
 </style>
 </head>
@@ -89,7 +91,7 @@ scale = document.getElementById('scale');
 var i;
 for (i=0; i<scale.children.length; i++) {
        var span = scale.children[i];
-       span.style.left = iec_scale(parseFloat(span.textContent)) * 100 + '%';
+       span.style.right = (100 - (iec_scale(parseFloat(span.textContent)) * 100)) + '%';
 }
 
 var ws = new WebSocket(get_appropriate_ws_url(), 'jack-wsmeter-protocol');