1
0
Fork 0

don't show negative signs inside minutes/seconds elements

This commit is contained in:
Adam Spiers 2016-04-16 18:00:27 +01:00
parent 933eba8789
commit 9c7fda43e9
1 changed files with 3 additions and 2 deletions

View File

@ -464,11 +464,12 @@
secondsEl = timeEl.querySelector( '.seconds-value' );
function _displayTime( hrEl, minEl, secEl, time) {
time = Math.round(time / 1000);
var sign = Math.sign(time) == -1 ? "-" : "";
time = Math.abs(Math.round(time / 1000));
var seconds = time % 60;
var minutes = ( time / 60 ) % 60 ;
var hours = time / ( 60 * 60 ) ;
hrEl.innerHTML = zeroPadInteger( hours );
hrEl.innerHTML = sign + zeroPadInteger( hours );
if (hours == 0) {
hrEl.classList.add( 'mute' );
}