Mercurial > hg > digilib-old
changeset 638:830bf803d9f0 jquery
setupBirdDiv deferred until used
author | robcast |
---|---|
date | Wed, 19 Jan 2011 10:58:30 +0100 |
parents | d904c0c74c15 |
children | 7a91bf50a728 |
files | client/digitallibrary/jquery/jquery.digilib.js |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js Tue Jan 18 22:50:03 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Wed Jan 19 10:58:30 2011 +0100 @@ -226,8 +226,6 @@ // create HTML structure setupScalerDiv(data); setupButtons(data, 'actionsStandard'); - // bird's eye view creation - TODO: could be deferred? - setupBirdviewDiv(data); // about window creation - TODO: could be deferred? restrict to only one item? setupAboutDiv(data); }); @@ -256,6 +254,10 @@ showBirdDiv : function (show) { var $elem = $(this); var data = $elem.data('digilib'); + if (data.$birdDiv == null) { + // no bird div -> create + setupBirdDiv(data); + } data.settings.isBirdDivVisible = showDiv(data.settings.isBirdDivVisible, data.$birdDiv, show); }, @@ -529,7 +531,7 @@ }; // creates HTML structure for the bird's eye view in elem - var setupBirdviewDiv = function (data) { + var setupBirdDiv = function (data) { var $elem = data.target; var settings = data.settings; // use only the relevant parameters