318 to do it */ |
318 to do it */ |
319 e.color = colors[j]; |
319 e.color = colors[j]; |
320 e.time = frames[i].mytweetsID[k].timeframe; |
320 e.time = frames[i].mytweetsID[k].timeframe; |
321 e.title = frames[i].mytweetsID[k].title; |
321 e.title = frames[i].mytweetsID[k].title; |
322 e.id = frames[i].mytweetsID[k].cinecast_id; |
322 e.id = frames[i].mytweetsID[k].cinecast_id; |
323 var pos = IriSP.jQuery(e.node).offset(); |
|
324 e.x = pos.left; |
|
325 e.y = pos.top; |
|
326 this.svgElements[e.id] = e; |
323 this.svgElements[e.id] = e; |
327 |
324 |
328 IriSP.jQuery(e.node).mouseenter(function(element) { return function (event) { |
325 IriSP.jQuery(e.node).mouseenter(function(element) { return function () { |
329 // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery. |
326 self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), element.attrs.x + element.attrs.width / 2, element.attrs.y - 2); |
330 self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.pageX - 106, event.pageY - 160); |
|
331 element.displayed = true; |
327 element.displayed = true; |
332 }}(e)).mousedown(function(element) { return function () { |
328 }}(e)).mousedown(function(element) { return function () { |
333 self._Popcorn.currentTime(element.time/1000); |
329 self._Popcorn.currentTime(element.time/1000); |
334 self._Popcorn.trigger("IriSP.PolemicTweet.click", element.id); |
330 self._Popcorn.trigger("IriSP.PolemicTweet.click", element.id); |
335 } |
331 } |