Skip to content
Snippets Groups Projects
Commit 9c7fda43 authored by Adam Spiers's avatar Adam Spiers
Browse files

don't show negative signs inside minutes/seconds elements

parent 933eba87
No related branches found
No related tags found
No related merge requests found
......@@ -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' );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment