web/LdtPlayer-release.js
changeset 23 44945db9746a
parent 22 11011b712cf2
child 24 36df3a25d7bd
equal deleted inserted replaced
22:11011b712cf2 23:44945db9746a
 10320                     self._Popcorn.currentTime(this.time/1000);
 10320                     self._Popcorn.currentTime(this.time/1000);
 10321                     self._Popcorn.trigger("IriSP.PolemicTweet.click", this.id); 
 10321                     self._Popcorn.trigger("IriSP.PolemicTweet.click", this.id); 
 10322                   });
 10322                   });
 10323                   */
 10323                   */
 10324                   
 10324                   
 10325                   IriSP.jQuery(e.node).mouseenter(function(element) { return function (event) {
 10325                   IriSP.jQuery(e.node).mouseenter(function(element) { return function (event) {                        
 10326                         // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery.                        
 10326                         // event.clientX and event.clientY are to raphael what event.pageX and pageY are to jquery.                        
 10327                         self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.clientX - 106, event.clientY - 160);
 10327                         self.TooltipWidget.show.call(self.TooltipWidget, element.title, element.attr("fill"), event.clientX - 106, event.clientY - 160);
 10328                         element.displayed = true;
 10328                         element.displayed = true;
 10329                   }}(e)).mouseleave(function(element) { return function () {                          
       
 10330                           self.TooltipWidget.hide.call(self.TooltipWidget);
       
 10331                   }}(e)).mousedown(function () {
 10329                   }}(e)).mousedown(function () {
 10332                     self._Popcorn.currentTime(this.time/1000);
 10330                     self._Popcorn.currentTime(this.time/1000);
 10333                     self._Popcorn.trigger("IriSP.PolemicTweet.click", this.id); 
 10331                     self._Popcorn.trigger("IriSP.PolemicTweet.click", this.id); 
 10334                   });                  
 10332                   });                  
 10335                   
 10333                   
 10371       this.paperSlider.toBack();
 10369       this.paperSlider.toBack();
 10372       this.paperBackground.toBack();
 10370       this.paperBackground.toBack();
 10373       this.sliderTip.toFront();
 10371       this.sliderTip.toFront();
 10374     }
 10372     }
 10375     
 10373     
       
 10374     this.selector.mouseleave(IriSP.wrap(this, function() { self.TooltipWidget.hide.call(self.TooltipWidget); }));
 10376     this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.sliderUpdater));
 10375     this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.sliderUpdater));
 10377 }
 10376 }
 10378 
 10377 
 10379 IriSP.PolemicWidget.prototype.sliderUpdater = function() {
 10378 IriSP.PolemicWidget.prototype.sliderUpdater = function() {
 10380 
 10379 
 10797 IriSP.TooltipWidget.prototype.clear = function() {
 10796 IriSP.TooltipWidget.prototype.clear = function() {
 10798 	this.selector.find(".tiptext").text("");
 10797 	this.selector.find(".tiptext").text("");
 10799 };
 10798 };
 10800 
 10799 
 10801 IriSP.TooltipWidget.prototype.show = function(text, color, x, y) {
 10800 IriSP.TooltipWidget.prototype.show = function(text, color, x, y) {
 10802   if (this._shown === true || this._displayedText == text)
 10801 
       
 10802   if (this._displayedText == text)
 10803     return;
 10803     return;
 10804     
       
 10805   // cancel the timeout for the previously displayed element.
       
 10806   if (this._hideTimeout != -1) {
       
 10807     window.clearTimeout(this._hideTimeout);
       
 10808     this._hideTimeout = -1;
       
 10809     console.log(text === this._displayedText);
       
 10810   }
       
 10811   debugger;
       
 10812   
 10804   
 10813   this.selector.find(".tipcolor").css("background-color", color);
 10805   this.selector.find(".tipcolor").css("background-color", color);
 10814   this._displayedText = text;
 10806   this._displayedText = text;
 10815 	this.selector.find(".tiptext").text(text);
 10807 	this.selector.find(".tiptext").text(text);
 10816   //this.selector.find(".tip").css("left", x).css("top", y);  
 10808   //this.selector.find(".tip").css("left", x).css("top", y);  
 10817   this.selector.find(".tip").css("left", x).css("top", "-160px");
 10809   this.selector.find(".tip").css("left", x).css("top", "-180px");
 10818   this.selector.find(".tip").show();
 10810   this.selector.find(".tip").show();
 10819   this._shown = true;
 10811   this._shown = true;
 10820 };
 10812 };
 10821 
 10813 
 10822 IriSP.TooltipWidget.prototype.hide = function() {  
 10814 IriSP.TooltipWidget.prototype.hide = function() {                                                   
 10823   this._hideTimeout = window.setTimeout(IriSP.wrap(this, function() {                                                  
 10815   console.log("hide");  
 10824                                                   this.selector.find(".tip").hide();
 10816   this.selector.find(".tip").hide();
 10825                                                   this._shown = false; }), 1000);
 10817   this._shown = false;  
 10826   
       
 10827 };
 10818 };
 10828 /* a widget that displays tweet - used in conjunction with the polemicWidget */
 10819 /* a widget that displays tweet - used in conjunction with the polemicWidget */
 10829 
 10820 
 10830 IriSP.TweetsWidget = function(Popcorn, config, Serializer) {
 10821 IriSP.TweetsWidget = function(Popcorn, config, Serializer) {
 10831   IriSP.Widget.call(this, Popcorn, config, Serializer);
 10822   IriSP.Widget.call(this, Popcorn, config, Serializer);