Merge pull request #4368 from lduarte1991/lduarte-harvardx-pr9

Annotation Tool: Removed color bug from Flagging and HighlightTags plugins
This commit is contained in:
Julia Hansbrough
2014-07-10 15:41:22 -04:00

View File

@@ -1032,12 +1032,13 @@ Annotator.Plugin.HighlightTags = (function(_super) {
if (typeof anns.tags != "undefined" && this.colors !== {}) {
for(var index = 0; index < anns.tags.length; ++index){
if (typeof this.colors[anns.tags[index]] != "undefined") {
var finalcolor = this.colors[anns.tags[index]];
$(annotations[annNum]).css("background","rgba("+finalcolor.red+","+finalcolor.green+","+finalcolor.blue+",0.3");
}else{
$(annotations[annNum]).css("background","");
if(anns.tags[index].indexOf("flagged-") == -1){
if (typeof this.colors[anns.tags[index]] != "undefined") {
var finalcolor = this.colors[anns.tags[index]];
$(annotations[annNum]).css("background","rgba("+finalcolor.red+","+finalcolor.green+","+finalcolor.blue+",0.3");
}else{
$(annotations[annNum]).css("background","");
}
}
}