From a1684d2e64279506b79df9718a5ea6f9bd32bdc6 Mon Sep 17 00:00:00 2001 From: lduarte1991 Date: Tue, 22 Jul 2014 12:49:59 -0400 Subject: [PATCH] Text Annotation Tool: Safari Colored Highlights Bug Fix - fixed spacing --- common/static/js/vendor/ova/tags-annotator.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/common/static/js/vendor/ova/tags-annotator.js b/common/static/js/vendor/ova/tags-annotator.js index 2de497b121..80d60a660a 100644 --- a/common/static/js/vendor/ova/tags-annotator.js +++ b/common/static/js/vendor/ova/tags-annotator.js @@ -1035,9 +1035,17 @@ Annotator.Plugin.HighlightTags = (function(_super) { 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"); + $(annotations[annNum]).css( + "background", + // last value, 0.3 is the standard highlight opacity for annotator + "rgba(" + finalcolor.red + ", " + finalcolor.green + ", " + finalcolor.blue + ", 0.3)" + ); }else{ - $(annotations[annNum]).css("background",""); + $(annotations[annNum]).css( + "background", + // returns the value to the inherited value without the above + "" + ); } } }