changeset 712:823f0050f7eb jquery

'reset' should reset fitwidth/fitheight, too
author hertzhaft
date Sun, 30 Jan 2011 16:38:54 +0100
parents eab17859be79
children 667a316edb89
files client/digitallibrary/jquery/jquery-test-full.html client/digitallibrary/jquery/jquery.digilib.js
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/client/digitallibrary/jquery/jquery-test-full.html	Sun Jan 30 16:37:05 2011 +0100
+++ b/client/digitallibrary/jquery/jquery-test-full.html	Sun Jan 30 16:38:54 2011 +0100
@@ -17,7 +17,8 @@
                 right: 5px;
                 top: 5px;
                 padding: 3px;
-                background-color: silver;
+                background-color: transparent;
+                z-index: 20;
             }
 
             img.button:hover {
@@ -42,7 +43,7 @@
               position: absolute;
               /* border: 2px solid #ffa060; */
               border: 2px solid #ff0000;
-              z-index: 200;
+              z-index: 100;
               }
 
             div.birdview {
@@ -71,6 +72,7 @@
                 
             div.bgDrag {
                 background-color: grey;
+                z-index: 0;
                 }
 
         </style>
--- a/client/digitallibrary/jquery/jquery.digilib.js	Sun Jan 30 16:37:05 2011 +0100
+++ b/client/digitallibrary/jquery/jquery.digilib.js	Sun Jan 30 16:38:54 2011 +0100
@@ -487,6 +487,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);
         },
 
@@ -776,10 +778,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/>');