292 |
292 |
293 if (this.yMax > y) { |
293 if (this.yMax > y) { |
294 this.yMax = y; |
294 this.yMax = y; |
295 } |
295 } |
296 |
296 |
|
297 /* some tweets seem to be duplicated - so we make a check before |
|
298 creating a new rect */ |
|
299 if (this.svgElements.hasOwnProperty(frames[i].mytweetsID[k].cinecast_id)) |
|
300 continue; |
|
301 |
297 var e = this.paper.rect(x, y, frameSize - margin, TweetHeight /* height */) |
302 var e = this.paper.rect(x, y, frameSize - margin, TweetHeight /* height */) |
298 .attr({stroke:"#00","stroke-width":0.1, fill: colors[j]}); |
303 .attr({stroke:"#00","stroke-width":0.1, fill: colors[j]}); |
299 |
304 |
300 addEheight += TweetHeight; |
305 addEheight += TweetHeight; |
301 |
306 |
302 e.color = colors[j]; |
307 e.color = colors[j]; |
303 e.time = frames[i].mytweetsID[k].timeframe; |
308 e.time = frames[i].mytweetsID[k].timeframe; |
304 e.title = frames[i].mytweetsID[k].title; |
309 e.title = frames[i].mytweetsID[k].title; |
305 e.id = frames[i].mytweetsID[k].cinecast_id; |
310 e.id = frames[i].mytweetsID[k].cinecast_id; |
306 |
311 |
307 this.svgElements[e.id] = e; |
312 this.svgElements[e.id] = e; |
308 |
313 |
309 IriSP.jQuery(e.node).mouseenter(function(element) { return function (event) { |
314 IriSP.jQuery(e.node).mouseenter(function(element) { return function (event) { |
310 // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery. |
315 // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery. |
311 self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.pageX - 106, event.pageY - 160); |
316 self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.pageX - 106, event.pageY - 160); |
386 |
391 |
387 |
392 |
388 // decrease the opacity of the other elements. |
393 // decrease the opacity of the other elements. |
389 for (var id in this.svgElements) { |
394 for (var id in this.svgElements) { |
390 var e = this.svgElements[id]; |
395 var e = this.svgElements[id]; |
391 e.attr({fill: e.color, opacity: 0.4}); |
396 e.attr({fill: e.color, opacity: 0.4}); |
392 } |
397 } |
393 |
398 |
394 |
399 |
395 for (var id in matches) { |
400 for (var id in matches) { |
396 if (this.svgElements.hasOwnProperty(id)) { |
401 if (this.svgElements.hasOwnProperty(id)) { |