changeset 1097:ebdde1bbb026

annotation show/hide works now.
author robcast
date Wed, 24 Oct 2012 18:05:47 +0200
parents 3c75dda660bf
children f677b9ac5110
files webapp/src/main/webapp/jquery/jquery.digilib.annotations.js
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.annotations.js	Tue Oct 23 23:20:45 2012 +0200
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.annotations.js	Wed Oct 24 18:05:47 2012 +0200
@@ -49,7 +49,7 @@
         toggleAnnotations : function(data) {
             var show = !data.settings.isAnnotationsVisible;
             data.settings.isAnnotationsVisible = show;
-            fn.highlightButtons(data, 'annotations', show);
+            digilib.fn.highlightButtons(data, 'annotations', show);
             renderAnnotations(data);
         },
 
@@ -134,6 +134,7 @@
         console.debug("renderAnnotations: annotations=" + annotations);
         // clear annotations
         $elem.find('div.' + cssPrefix + 'annotationmark').remove();
+        if (!data.settings.isAnnotationsVisible) return;
         for (var i = 0; i < annotations.length; i++) {
             var annotation = annotations[i];
             if (data.zoomArea.containsPosition(annotation.pos)) {