Skip to content

Commit

Permalink
fix foreground bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoninoBonanno committed Mar 17, 2020
1 parent 5e2ba1c commit 6e9761b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/dragDropAnnotate.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,12 @@
var foregroundAnno = undefined;
_annotations.forEach(annotation => {
var isEqual = (!annotationToHighlight) ? false : ((annotationToHighlight instanceof Object) ? (annotation == annotationToHighlight) : annotation.id === annotationToHighlight);
if (isEqual && opts["annotationStyle"]["foreground"]) foregroundAnno = annotation;
else _drawAnnotation(annotation, isEqual);
if (isEqual && opts["annotationStyle"]["foreground"]) {
if (foregroundAnno) _drawAnnotation(foregroundAnno, true);
foregroundAnno = annotation;
return;
}
_drawAnnotation(annotation, isEqual);
});
if (foregroundAnno) _drawAnnotation(foregroundAnno, true);
};
Expand Down
Loading

0 comments on commit 6e9761b

Please sign in to comment.