src/js/widgets/polemicWidget.js
branchpopcorn-port
changeset 842 4ae2247a59f4
parent 830 18ca612e9ff0
child 874 38b65761a7d5
equal deleted inserted replaced
841:8da49ff273e0 842:4ae2247a59f4
    49     var frameSize     = 5;             // frame size 
    49     var frameSize     = 5;             // frame size 
    50     var margin         = 1;            // marge between frame
    50     var margin         = 1;            // marge between frame
    51     var lineSize      = this.width;        // timeline pixel width 
    51     var lineSize      = this.width;        // timeline pixel width 
    52     var nbrframes     = lineSize/frameSize;     // frame numbers
    52     var nbrframes     = lineSize/frameSize;     // frame numbers
    53     var numberOfTweet   = 0;            // number of tweet overide later 
    53     var numberOfTweet   = 0;            // number of tweet overide later 
    54     var duration      = this._serializer.getDuration();      // timescale width 
    54     var duration      = this.getDuration();      // timescale width 
    55     var frameLength   = lineSize / frameSize;    // frame timescale  
    55     var frameLength   = lineSize / frameSize;    // frame timescale  
    56     var timeline;
    56     var timeline;
    57     var colors  = new Array("","#1D973D","#036AAE","#CE0A15","#C5A62D","#585858");
    57     var colors  = new Array("","#1D973D","#036AAE","#CE0A15","#C5A62D","#585858");
    58     
    58     
    59     // array 
    59     // array 
   383 
   383 
   384 /** update the positionMarker as time passes */
   384 /** update the positionMarker as time passes */
   385 IriSP.PolemicWidget.prototype.sliderUpdater = function() {
   385 IriSP.PolemicWidget.prototype.sliderUpdater = function() {
   386 
   386 
   387     var time = +this._Popcorn.currentTime();
   387     var time = +this._Popcorn.currentTime();
   388     var duration = this._serializer.getDuration();
   388     var duration = this.getDuration();
   389     
   389     
   390     this.paperSlider.attr("width", time * (this.width / (duration / 1000)));
   390     this.paperSlider.attr("width", time * (this.width / (duration / 1000)));
   391         
   391         
   392     this.sliderTip.attr("x", time * (this.width / (duration / 1000)));
   392     this.sliderTip.attr("x", time * (this.width / (duration / 1000)));
   393 };
   393 };