Mercurial > hg > digilib-old
changeset 639:7a91bf50a728 jquery
setupBirdDiv called early if enabled in options
author | robcast |
---|---|
date | Wed, 19 Jan 2011 11:09:35 +0100 |
parents | 830bf803d9f0 |
children | fcb887110471 |
files | client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 1 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js Wed Jan 19 10:58:30 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Wed Jan 19 11:09:35 2011 +0100 @@ -180,8 +180,7 @@ // is birdView shown? 'isBirdDivVisible' : false, // dimensions of bird's eye window - 'birdMaxX' : 200, - 'birdMaxY' : 200, + 'birdDivOptions' : {'dw' : 200, 'dh' : 200}, // is the "about" window shown? 'isAboutDivVisible' : false @@ -226,6 +225,10 @@ // create HTML structure setupScalerDiv(data); setupButtons(data, 'actionsStandard'); + // bird's eye view creation + if (settings.isBirdDivVisible) { + setupBirdDiv(data); + } // about window creation - TODO: could be deferred? restrict to only one item? setupAboutDiv(data); }); @@ -536,11 +539,7 @@ var settings = data.settings; // use only the relevant parameters var keys = ['fn','pn','dw','dh']; - var birdDimensions = { - 'dw' : settings.birdMaxX, - 'dh' : settings.birdMaxY - }; - var birdSettings = $.extend({}, settings, birdDimensions); + var birdSettings = $.extend({}, settings, settings.birdDivOptions); var birdUrl = settings.scalerBaseUrl + '?' + getParamString(birdSettings, keys); // the bird's eye div var $birdviewDiv = $('<div class="birdview" style="display:none"/>');