src/js/widgets/segmentsWidget.js
branchpopcorn-port
changeset 827 1dc2f85c3b89
parent 820 7968346b9689
child 829 ae16691d183d
equal deleted inserted replaced
826:c7ae4f126e51 827:1dc2f85c3b89
   131        method scope, so after that the loop is run, so they're not
   131        method scope, so after that the loop is run, so they're not
   132        preserved */
   132        preserved */
   133     (function(divTitle) { 
   133     (function(divTitle) { 
   134      return function(event) {
   134      return function(event) {
   135           IriSP.jQuery(this).animate({opacity: 0.6}, 5);
   135           IriSP.jQuery(this).animate({opacity: 0.6}, 5);
   136           var offset = IriSP.jQuery(this).offset();
   136           var offset_x = IriSP.jQuery(this).position().left + IriSP.jQuery(this).outerWidth() / 2;
   137           var correction = IriSP.jQuery(this).outerWidth() / 2;
   137 
   138 
   138           self.TooltipWidget.show(divTitle, color, offset_x, 0);
   139           var offset_x = offset.left + correction - 106;
       
   140           if (offset_x < 0)
       
   141             offset_x = 0;
       
   142           
       
   143           var offset_y = offset.top;          
       
   144 
       
   145           self.TooltipWidget.show(divTitle, color, offset_x, offset_y - 160);
       
   146     } })(divTitle)).mouseout(function(){
   139     } })(divTitle)).mouseout(function(){
   147       IriSP.jQuery(this).animate({opacity: 0.3}, 5);
   140       IriSP.jQuery(this).animate({opacity: 0.3}, 5);
   148       self.TooltipWidget.hide();
   141       self.TooltipWidget.hide();
   149     });
   142     });
   150 
   143