src/js/widgets/segmentsWidget.js
branchpopcorn-port
changeset 656 404f876827ad
parent 638 1cbe440312e1
child 687 3583e8b447f5
equal deleted inserted replaced
655:b1e2dfc7a740 656:404f876827ad
    45 
    45 
    46   this.selector.addClass("Ldt-SegmentsWidget");
    46   this.selector.addClass("Ldt-SegmentsWidget");
    47   this.selector.append(Mustache.to_html(IriSP.overlay_marker_template));
    47   this.selector.append(Mustache.to_html(IriSP.overlay_marker_template));
    48           
    48           
    49   var view_type = this._serializer.getChapitrage();
    49   var view_type = this._serializer.getChapitrage();
    50   if (typeof(view_type) === "undefined")
    50   if (typeof(view_type) === "undefined") {
    51     view_type = this._serializer.getNonTweetIds()[0];    
    51     view_type = this._serializer.getNonTweetIds()[0];  
    52   
    52   }
    53   this.positionMarker = this.selector.children(":first");
    53   this.positionMarker = this.selector.children(":first");
    54   
    54   
    55   this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.positionUpdater));
    55   this._Popcorn.listen("timeupdate", IriSP.wrap(this, this.positionUpdater));
    56   
    56   
    57   
    57   
    99     else
    99     else
   100       var color = annotation.color;
   100       var color = annotation.color;
   101     
   101     
   102     var hexa_color = IriSP.DEC_HEXA_COLOR(color);
   102     var hexa_color = IriSP.DEC_HEXA_COLOR(color);
   103 
   103 
       
   104     /*
   104     if (hexa_color === "FFCC00")
   105     if (hexa_color === "FFCC00")
   105       hexa_color = "333";
   106       hexa_color = "333";
       
   107     */
   106     if (hexa_color.length == 4)
   108     if (hexa_color.length == 4)
   107       hexa_color = hexa_color + '00';
   109       hexa_color = hexa_color + '00';
   108     
   110     
   109     var annotationTemplate = Mustache.to_html(IriSP.annotation_template,
   111     var annotationTemplate = Mustache.to_html(IriSP.annotation_template,
   110         {"divTitle" : divTitle, "id" : id, "startPixel" : startPixel,
   112         {"divTitle" : divTitle, "id" : id, "startPixel" : startPixel,