src/js/widgets/polemicWidget.js
branchpopcorn-port
changeset 246 533716922da5
parent 231 accc7358d8b5
child 265 e0d32948bf62
equal deleted inserted replaced
242:2b8380ef73a1 246:533716922da5
    33   this.tweets  = new Array();
    33   this.tweets  = new Array();
    34   this.svgElements = new Array();
    34   this.svgElements = new Array();
    35   
    35   
    36   // Make and define the Raphael area
    36   // Make and define the Raphael area
    37   this.paper = Raphael(document.getElementById(this._id), config.width, config.height);
    37   this.paper = Raphael(document.getElementById(this._id), config.width, config.height);
    38   
       
    39 };
    38 };
    40 
    39 
    41 IriSP.PolemicWidget.prototype = new IriSP.Widget();
    40 IriSP.PolemicWidget.prototype = new IriSP.Widget();
    42   
    41   
    43 IriSP.PolemicWidget.prototype.draw = function() {
    42 IriSP.PolemicWidget.prototype.draw = function() {
   277                   
   276                   
   278                   e.mouseover(function(element) { return function (event) {
   277                   e.mouseover(function(element) { return function (event) {
   279                         // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery.                        
   278                         // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery.                        
   280                         self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.clientX - 106, event.clientY - 160);
   279                         self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.clientX - 106, event.clientY - 160);
   281                         element.displayed = true;
   280                         element.displayed = true;
   282                         debugger;
       
   283                   }}(e)).mouseout(function(element) { return function () {                          
   281                   }}(e)).mouseout(function(element) { return function () {                          
   284                           self.TooltipWidget.hide.call(self.TooltipWidget);
   282                           self.TooltipWidget.hide.call(self.TooltipWidget);
   285                   }}(e)).mousedown(function () {
   283                   }}(e)).mousedown(function () {
   286                     self._Popcorn.currentTime(this.time/1000);
   284                     self._Popcorn.currentTime(this.time/1000);
   287                   });
   285                   });