# HG changeset patch # User robcast # Date 1298053094 -3600 # Node ID 6aa9908303f17bca4e08b4e2ecde146823db9877 # Parent 00d37112d06249d18d065473c35e0fe66ab7172e added redisplay handler to birdseye. updated plugin docu. diff -r 00d37112d062 -r 6aa9908303f1 client/digitallibrary/jquery/jquery-digilib-plugins.txt --- 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). diff -r 00d37112d062 -r 6aa9908303f1 client/digitallibrary/jquery/jquery.digilib.birdseye.js --- 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;