src/js/widgets/polemicWidget.js
branchpopcorn-port
changeset 197 a793a8a0c9d2
parent 196 9fb4dcb0b878
child 203 9b76fc6564b1
equal deleted inserted replaced
196:9fb4dcb0b878 197:a793a8a0c9d2
   298 			}		
   298 			}		
   299 			// DRAW UI :: resize border and bgd			
   299 			// DRAW UI :: resize border and bgd			
   300 			this.paperBackground = this.paper.rect(0, this.yMax, this.width, this.heightmax).attr({fill:"#F8F8F8","stroke-width":0.1,opacity: 1});	
   300 			this.paperBackground = this.paper.rect(0, this.yMax, this.width, this.heightmax).attr({fill:"#F8F8F8","stroke-width":0.1,opacity: 1});	
   301 			// var PaperBorder 	= this.paper.rect(0, this.yMax,this.width,1).attr({fill:"#fff",stroke: "none",opacity: 1});	
   301 			// var PaperBorder 	= this.paper.rect(0, this.yMax,this.width,1).attr({fill:"#fff",stroke: "none",opacity: 1});	
   302 	
   302 	
   303       this.paperSlider 	= this.paper.rect(0, this.yMax, 0, this.heightmax).attr({fill:"#D4D5D5", stroke: "none", opacity: 1});				
   303       this.paperSlider 	= this.paper.rect(0, this.yMax, 0, this.heightmax).attr({fill:"#D4D5D5", stroke: "none", opacity: 1});
       
   304       
       
   305       // the small white line displayed over the slider.
       
   306       this.sliderTip = this.paper.rect(0, this.yMax, 5, this.heightmax).attr({fill:"#FFFFFF", stroke: "none", opacity: 1});
       
   307       
   304 			// decalage 
   308 			// decalage 
   305 			tweetSelection = this.paper.rect(-100,-100,5,5).attr({fill:"#fff",stroke: "none",opacity: 1});	
   309 			tweetSelection = this.paper.rect(-100,-100,5,5).attr({fill:"#fff",stroke: "none",opacity: 1});	
   306 			
   310 			
   307       
   311       
   308 			this.paperSlider.toBack();
   312 			this.paperSlider.toBack();
   309 			this.paperBackground.toBack();
   313 			this.paperBackground.toBack();
       
   314       this.sliderTip.toFront();
   310 		}
   315 		}
   311     
   316     
   312     this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.sliderUpdater));
   317     this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.sliderUpdater));
   313 }
   318 }
   314 
   319 
   316 
   321 
   317     var time = +this._Popcorn.currentTime();
   322     var time = +this._Popcorn.currentTime();
   318     var duration = +this._serializer.currentMedia().meta["dc:duration"];
   323     var duration = +this._serializer.currentMedia().meta["dc:duration"];
   319     
   324     
   320     this.paperSlider.attr("width", time * (this.width / (duration / 1000)));
   325     this.paperSlider.attr("width", time * (this.width / (duration / 1000)));
       
   326         
       
   327     this.sliderTip.attr("x", time * (this.width / (duration / 1000)));
   321 };
   328 };
   322     
   329     
   323     
   330