changeset 796:6aa9908303f1 jquery

added redisplay handler to birdseye. updated plugin docu.
author robcast
date Fri, 18 Feb 2011 19:18:14 +0100
parents 00d37112d062
children 6914ddedaca7
files client/digitallibrary/jquery/jquery-digilib-plugins.txt client/digitallibrary/jquery/jquery.digilib.birdseye.js
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery-digilib-plugins.txt	Fri Feb 18 18:58:52 2011 +0100
+++ b/client/digitallibrary/jquery/jquery-digilib-plugins.txt	Fri Feb 18 19:18:14 2011 +0100
@@ -35,4 +35,8 @@
 
 * further actions should be implemented as custom events on the data object.
 
-* events should be documented here...
+* events triggered by digilib on the data object:
+  "setup": in the init phase, after scalerDiv and buttons have been set up.
+  "update", updateDisplay(): after small updates in the display, e.g. when the scaler-img finished loading.
+  "redisplay", redisplay(): after changes in the display, e.g. after changing zoom factor.
+  "dragZoom(newZoomArea)": while dragging the zoom area (with parameter newZoomArea).
--- a/client/digitallibrary/jquery/jquery.digilib.birdseye.js	Fri Feb 18 18:58:52 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.birdseye.js	Fri Feb 18 19:18:14 2011 +0100
@@ -64,6 +64,7 @@
         // install event handler
         $data.bind('setup', handleSetup);
         $data.bind('update', handleUpdate);
+        $data.bind('redisplay', handleRedisplay);
         $data.bind('dragZoom', handleDragZoom);
     };
         
@@ -87,6 +88,14 @@
         }
     };
     
+    var handleRedisplay = function (evt) {
+        console.debug("birdseye: handleRedisplay");
+        data = this;
+        if (data.settings.isBirdDivVisible) {
+            updateBirdDiv(data);
+        }
+    };
+    
     var handleDragZoom = function (evt, zoomArea) {
         //console.debug("birdseye: handleDragZoom za="+zoomArea);
         data = this;