linterna-magica-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linterna-magica-commit] [227] Fix for the inaccurate minutes and hours


From: Ivaylo Valkov
Subject: [linterna-magica-commit] [227] Fix for the inaccurate minutes and hours for clips duration and position.
Date: Tue, 29 Nov 2011 20:37:12 +0000

Revision: 227
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=linterna-magica&revision=227
Author:   valkov
Date:     2011-11-29 20:37:12 +0000 (Tue, 29 Nov 2011)
Log Message:
-----------
Fix for the inaccurate minutes and hours for clips duration and position. 
Rounding was not a good idea. Floor seems to work OK.

Modified Paths:
--------------
    trunk/src/lm_player_button_functions.js

Modified: trunk/src/lm_player_button_functions.js
===================================================================
--- trunk/src/lm_player_button_functions.js     2011-11-29 19:45:11 UTC (rev 
226)
+++ trunk/src/lm_player_button_functions.js     2011-11-29 20:37:12 UTC (rev 
227)
@@ -273,12 +273,12 @@
     }
 
     var sec_pos = Math.round(time.position) % 60;
-    var min_pos = Math.round(time.position / 60) % 60;
-    var hour_pos = Math.round(time.position / 3600);
+    var min_pos = Math.floor(time.position / 60) % 60;
+    var hour_pos = Math.floor(time.position / 3600);
 
     var sec_dur = Math.round(time.duration) % 60;
-    var min_dur = Math.round(time.duration / 60) % 60;
-    var hour_dur = Math.round(time.duration / 3600);
+    var min_dur = Math.floor(time.duration / 60) % 60;
+    var hour_dur = Math.floor(time.duration / 3600);
 
     time.string = (hour_pos ?
                   (hour_pos+":") : "")+




reply via email to

[Prev in Thread] Current Thread [Next in Thread]