# HG changeset patch # User hertzhaft # Date 1331322426 -3600 # Node ID e077f52205a76e6a6a0a9b7752583d4fdd938050 # Parent ef94924cc0c42285598f56d5581c54fc9cf7d7a1 autoBirdDiv option diff -r ef94924cc0c4 -r e077f52205a7 webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js Fri Mar 09 17:10:14 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js Fri Mar 09 20:47:06 2012 +0100 @@ -23,6 +23,8 @@ var defaults = { // is birdView shown? 'isBirdDivVisible' : false, + // is birdView automatically shown for a zoomed image and hidden when not? + 'autoBirdDiv' : false, // dimensions of bird's eye div 'birdDivWidth' : 200, 'birdDivHeight' : 200, diff -r ef94924cc0c4 -r e077f52205a7 webapp/src/main/webapp/jquery/jquery.digilib.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.js Fri Mar 09 17:10:14 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.js Fri Mar 09 20:47:06 2012 +0100 @@ -336,11 +336,11 @@ * @param mode */ zoomFull : function (data, mode) { + var settings = data.settings; data.zoomArea = FULL_AREA.copy(); setFitMode(data, mode); // zoom full only works in screen mode setScaleMode(data, 'screen'); - data.settings.isBirdDivVisible = false; redisplay(data); }, @@ -459,7 +459,6 @@ var size = getFullscreenImgSize(data); settings.dw = params.dw || size.width; settings.dh = params.dh || size.height; - settings.isBirdDivVisible = false; settings.visibleButtonSets = 1; // FIXME // resets zoomArea, marks, scalerflags data.zoomArea = FULL_AREA.copy(); @@ -858,7 +857,10 @@ * */ var redisplay = function (data) { - var settings = data.settings; + var settings = data.settings; + if (settings.autoBirdDiv) { + settings.isBirdDivVisible = !isFullArea(data.zoomArea); + } if (settings.interactionMode === 'fullscreen') { // update location.href (browser URL) in fullscreen mode var url = getDigilibUrl(data);