src/js/widgets/polemicWidget.js
branchpopcorn-port
changeset 477 1e51d638e7ea
parent 443 7612eced3867
child 478 1422ba0fc333
equal deleted inserted replaced
476:3957157b7f96 477:1e51d638e7ea
   285                   e.title = frames[i].mytweetsID[k].title;
   285                   e.title = frames[i].mytweetsID[k].title;
   286                   e.id = frames[i].mytweetsID[k].cinecast_id;
   286                   e.id = frames[i].mytweetsID[k].cinecast_id;
   287 
   287 
   288                   this.svgElements[e.id] = e;
   288                   this.svgElements[e.id] = e;
   289 
   289 
       
   290                   /*
   290                   e.mouseover(function(element) { return function (event) {
   291                   e.mouseover(function(element) { return function (event) {
   291                         // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery.                        
   292                         // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery.                        
   292                         self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.clientX - 106, event.clientY - 160);
   293                         self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.clientX - 106, event.clientY - 160);
   293                         element.displayed = true;
   294                         element.displayed = true;
   294                   }}(e)).mouseout(function(element) { return function () {                          
   295                   }}(e)).mouseout(function(element) { return function () {                          
   295                           self.TooltipWidget.hide.call(self.TooltipWidget);
   296                           self.TooltipWidget.hide.call(self.TooltipWidget);
   296                   }}(e)).mousedown(function () {
   297                   }}(e)).mousedown(function () {
   297                     self._Popcorn.currentTime(this.time/1000);
   298                     self._Popcorn.currentTime(this.time/1000);
   298                     self._Popcorn.trigger("IriSP.PolemicTweet.click", this.id); 
   299                     self._Popcorn.trigger("IriSP.PolemicTweet.click", this.id); 
   299                   });
   300                   });
       
   301                   */
       
   302                   
       
   303                   IriSP.jQuery(e.node).mouseenter(function(element) { return function (event) {
       
   304                         // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery.                        
       
   305                         self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.clientX - 106, event.clientY - 160);
       
   306                         element.displayed = true;
       
   307                   }}(e)).mouseleave(function(element) { return function () {                          
       
   308                           self.TooltipWidget.hide.call(self.TooltipWidget);
       
   309                   }}(e)).mousedown(function () {
       
   310                     self._Popcorn.currentTime(this.time/1000);
       
   311                     self._Popcorn.trigger("IriSP.PolemicTweet.click", this.id); 
       
   312                   });                  
   300                   
   313                   
   301                   IriSP.jQuery(e.node).attr('id', 't' + k + '');
   314                   IriSP.jQuery(e.node).attr('id', 't' + k + '');
   302                   IriSP.jQuery(e.node).attr('title', frames[i].mytweetsID[k].title);
   315                   IriSP.jQuery(e.node).attr('title', frames[i].mytweetsID[k].title);
   303                   IriSP.jQuery(e.node).attr('begin',  frames[i].mytweetsID[k].timeframe);                  
   316                   IriSP.jQuery(e.node).attr('begin',  frames[i].mytweetsID[k].timeframe);                  
   304                 }
   317                 }