added a rectangle tip to show where we are in the video . popcorn-port
authorhamidouk
Fri, 04 Nov 2011 16:30:22 +0100
branchpopcorn-port
changeset 197 a793a8a0c9d2
parent 196 9fb4dcb0b878
child 198 8ffb1b7a9c6b
added a rectangle tip to show where we are in the video .
src/js/widgets/polemicWidget.js
--- a/src/js/widgets/polemicWidget.js	Fri Nov 04 16:08:25 2011 +0100
+++ b/src/js/widgets/polemicWidget.js	Fri Nov 04 16:30:22 2011 +0100
@@ -300,13 +300,18 @@
 			this.paperBackground = this.paper.rect(0, this.yMax, this.width, this.heightmax).attr({fill:"#F8F8F8","stroke-width":0.1,opacity: 1});	
 			// var PaperBorder 	= this.paper.rect(0, this.yMax,this.width,1).attr({fill:"#fff",stroke: "none",opacity: 1});	
 	
-      this.paperSlider 	= this.paper.rect(0, this.yMax, 0, this.heightmax).attr({fill:"#D4D5D5", stroke: "none", opacity: 1});				
+      this.paperSlider 	= this.paper.rect(0, this.yMax, 0, this.heightmax).attr({fill:"#D4D5D5", stroke: "none", opacity: 1});
+      
+      // the small white line displayed over the slider.
+      this.sliderTip = this.paper.rect(0, this.yMax, 5, this.heightmax).attr({fill:"#FFFFFF", stroke: "none", opacity: 1});
+      
 			// decalage 
 			tweetSelection = this.paper.rect(-100,-100,5,5).attr({fill:"#fff",stroke: "none",opacity: 1});	
 			
       
 			this.paperSlider.toBack();
 			this.paperBackground.toBack();
+      this.sliderTip.toFront();
 		}
     
     this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.sliderUpdater));
@@ -318,6 +323,8 @@
     var duration = +this._serializer.currentMedia().meta["dc:duration"];
     
     this.paperSlider.attr("width", time * (this.width / (duration / 1000)));
+        
+    this.sliderTip.attr("x", time * (this.width / (duration / 1000)));
 };
     
     
\ No newline at end of file