71 |
71 |
72 endPourcent -= onePxPercent; |
72 endPourcent -= onePxPercent; |
73 } |
73 } |
74 |
74 |
75 var divTitle = annotation.content.title.substr(0,55); |
75 var divTitle = annotation.content.title.substr(0,55); |
76 var color = annotation.content.color |
|
77 |
76 |
78 |
77 if (typeof(annotation.content.color) !== "undefined") |
|
78 var color = annotation.content.color; |
|
79 else |
|
80 var color = annotation.color; |
|
81 |
|
82 var hexa_color = IriSP.DEC_HEXA_COLOR(color); |
|
83 console.log(hexa_color); |
|
84 if (hexa_color === "FFCC00") |
|
85 hexa_color = "333"; |
|
86 |
79 var annotationTemplate = Mustache.to_html(IriSP.annotation_template, |
87 var annotationTemplate = Mustache.to_html(IriSP.annotation_template, |
80 {"divTitle" : divTitle, "id" : id, "startPourcent" : startPourcent, |
88 {"divTitle" : divTitle, "id" : id, "startPourcent" : startPourcent, |
81 "endPourcent" : endPourcent, "hexa_color" : IriSP.DEC_HEXA_COLOR(color), |
89 "endPourcent" : endPourcent, "hexa_color" : hexa_color, |
82 "seekPlace" : Math.round(begin/1000)}); |
90 "seekPlace" : Math.round(begin/1000)}); |
83 |
91 |
84 |
92 |
85 this.selector.append(annotationTemplate); |
93 this.selector.append(annotationTemplate); |
86 |
94 |