diff -r 098929cd2d62 -r ada550479aaf src/js/widgets/polemicWidget.js --- a/src/js/widgets/polemicWidget.js Tue Jan 03 12:05:46 2012 +0100 +++ b/src/js/widgets/polemicWidget.js Tue Jan 03 12:25:57 2012 +0100 @@ -294,6 +294,11 @@ this.yMax = y; } + /* some tweets seem to be duplicated - so we make a check before + creating a new rect */ + if (this.svgElements.hasOwnProperty(frames[i].mytweetsID[k].cinecast_id)) + continue; + var e = this.paper.rect(x, y, frameSize - margin, TweetHeight /* height */) .attr({stroke:"#00","stroke-width":0.1, fill: colors[j]}); @@ -303,7 +308,7 @@ e.time = frames[i].mytweetsID[k].timeframe; e.title = frames[i].mytweetsID[k].title; e.id = frames[i].mytweetsID[k].cinecast_id; - + this.svgElements[e.id] = e; IriSP.jQuery(e.node).mouseenter(function(element) { return function (event) { @@ -388,7 +393,7 @@ // decrease the opacity of the other elements. for (var id in this.svgElements) { var e = this.svgElements[id]; - e.attr({fill: e.color, opacity: 0.4}); + e.attr({fill: e.color, opacity: 0.4}); }