src/js/widgets/sparklineWidget.js
branchpopcorn-port
changeset 645 0c8ca890c9f1
parent 644 492d3c8d776a
child 688 76953dd536de
--- a/src/js/widgets/sparklineWidget.js	Mon Jan 16 17:27:23 2012 +0100
+++ b/src/js/widgets/sparklineWidget.js	Tue Jan 17 11:00:33 2012 +0100
@@ -101,7 +101,7 @@
 IriSP.SparklineWidget.prototype.handleNewAnnotation = function(annotation) {
   var num_columns = (this.selector.width()) / IriSP.widgetsDefaults["SparklineWidget"].column_width;
   var duration = +this._serializer.currentMedia().meta["dc:duration"];
-  var time_step = duration / num_columns; /* the time interval between two columns */
+  var time_step = Math.round(duration / num_columns); /* the time interval between two columns */
   var begin = +annotation.begin;
   
   var index = Math.floor(begin / time_step);