# HG changeset patch # User hertzhaft # Date 1329591424 -3600 # Node ID 7117109fece073fa4e8bbaed3f639626d93345b5 # Parent 359e7e697eb2092ab8d01e89fc653fdba54af5e3 get rid of another callback loop diff -r 359e7e697eb2 -r 7117109fece0 webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js --- a/webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js Sat Feb 18 19:25:03 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.digilib.birdseye.js Sat Feb 18 19:57:04 2012 +0100 @@ -170,14 +170,15 @@ var $birdImg = $(this); var birdRect = geom.rectangle($birdImg); console.debug("birdImg loaded!", $birdImg, "rect=", birdRect, "data=", data); - if (birdRect.width === 0) { - // malheureusement IE7 calls load handler when there is no size info yet - setTimeout(function () { $birdImg.triggerHandler('load'); }, 200); - } // create Transform from current area and picsize data.birdTrafo = digilib.fn.getImgTrafo(data.$birdImg, FULL_AREA); // update display (zoom area indicator) if (data.settings.isBirdDivVisible) { + if (birdRect.width === 0) { + // workaround: IE7 calls load handler when there is no size info yet + setTimeout(function () { $birdImg.triggerHandler('load'); }, 200); + return; + } renderBirdArea(data); } };