# HG changeset patch # User hertzhaft # Date 1296465390 -3600 # Node ID 4f96149cf584904da088deecad225a2e5ee62711 # Parent 3da6db751448343fe8afc23af23e09d801072798 adjust size of scalerDiv only when img loaded diff -r 3da6db751448 -r 4f96149cf584 client/digitallibrary/jquery/jquery.digilib.js --- a/client/digitallibrary/jquery/jquery.digilib.js Mon Jan 31 10:05:49 2011 +0100 +++ b/client/digitallibrary/jquery/jquery.digilib.js Mon Jan 31 10:16:30 2011 +0100 @@ -784,9 +784,6 @@ // embedded mode -- just change img src var url = getScalerUrl(data); data.$img.attr('src', url); - // set scaler div size explicitly in case $img is hidden (for zoomDrag) - $imgRect = geom.rectangle(data.$img); - $imgRect.adjustDiv(data.$scaler); // load new bird img (in case the scalerUrl has changed, like in gotopage) showBirdDiv(data); } @@ -1075,6 +1072,10 @@ data.imgTrafo = getImgTrafo($img, data.zoomArea, data.settings.rot, data.scalerFlags.hmir, data.scalerFlags.vmir); console.debug("imgTrafo=", data.imgTrafo); + // set scaler div size explicitly in case $img is hidden (for zoomDrag) + var $imgRect = geom.rectangle(data.$img); + console.debug("imgrect=", $imgRect); + $imgRect.adjustDiv(data.$scaler); // show image in case it was hidden (for example in zoomDrag) $img.show(); // display marks