diff -r 8da49ff273e0 -r 4ae2247a59f4 src/js/widgets/sparklineWidget.js --- a/src/js/widgets/sparklineWidget.js Tue Apr 03 20:30:12 2012 +0200 +++ b/src/js/widgets/sparklineWidget.js Fri Apr 06 16:49:32 2012 +0200 @@ -5,9 +5,6 @@ this._oldAnnotation = null; this._results = []; - this.lineColor = this._config.lineColor || "#7492b4"; - this.fillColor = this._config.fillColor || "#aeaeb8"; - this.lineWidth = this._config.lineWidth || 2; this.slices = this._config.slices || Math.floor(this.width/20); if (!this.width) { this.width = this.selector.width(); @@ -19,7 +16,6 @@ if (this._config.background) { this.selector.css("background", this._config.background); } - this.checkOption('cinecast_version'); }; @@ -31,7 +27,7 @@ /** draw the sparkline using jquery sparkline */ IriSP.SparklineWidget.prototype.draw = function() { - this.duration = this._serializer.getDuration(); + this.duration = this.getDuration(); this.paper = new Raphael(this.selector[0], this.width, this.height); var _this = this; @@ -58,7 +54,7 @@ _sliceDuration = Math.floor( this.duration / this.slices), _results = _(_.range(this.slices)).map(function(_i) { return _(_annotations).filter(function(_a){ - return (_a.begin <= (1 + _i) * _sliceDuration) && (_a.end >= _i * _sliceDuration) && (!_this.cinecast_version || _a.type == "cinecast:UserAnnotation") + return (_a.begin <= (1 + _i) * _sliceDuration) && (_a.end >= _i * _sliceDuration) }).length; }); }