diff client/digitallibrary/jquery/jquery.digilib.js @ 714:667a316edb89 jquery

merge with 823f0050f7eb3e568cf55042b7d5958eecb8854e
author robcast
date Sun, 30 Jan 2011 18:11:07 +0100
parents c1fa722c570e 823f0050f7eb
children c1b1c463bc44
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery.digilib.js	Sun Jan 30 17:58:56 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.js	Sun Jan 30 18:11:07 2011 +0100
@@ -508,6 +508,8 @@
             // TODO: should we really reset all user preferences here?
             settings.isBirdDivVisible = false;
             settings.visibleButtonSets = 1;
+            delete data.dlOpts.fitwidth;
+            delete data.dlOpts.fitheight;
             redisplay(data);
         },
 
@@ -797,10 +799,10 @@
         if (settings.interactionMode === 'fullscreen') {
             var imgSize = getFullscreenImgSize($elem);
             // fitwidth/height omits destination height/width
-            if (data.dlOpts.fitheight == null) {
+            if (data.dlOpts.fitheight !== '1') {
                 settings.dw = imgSize.width;
             }
-            if (data.dlOpts.fitwidth == null) {
+            if (data.dlOpts.fitwidth !== '1') {
                 settings.dh = imgSize.height;
             }
             $img = $('<img/>');